Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 2.08 KB

scratch-k8s-che.didact.md

File metadata and controls

33 lines (26 loc) · 2.08 KB

Scratch blocks to interact with Kubernetes

Welcome to this demo to add new blocks to Scratch to interact with your Kubernetes cluster. Eclipse Che - Scratch - Kubernetes

Before you start

Make sure that you are connected into a valid Kubernetes cluster (for instance with the Openshift view or Kubernetes view).

Setup and start the project

Compile and start Scratch with Kubernetes blocks

To start, run the 3 predifined commands, either:

  • From the My Workspace view on the right
  • Or by clicking on the commands below:
    • 1. install all required dependencies
    • 2. Start Scratch-gui in Devmode
    • 3. Start Development mode (Hot reload + debug)

Open the URL provided by the last command.

Playing with Scratch and the Kubernetes blocks

You should see Scratch running. By the default, the K8S blocks are not available.

  • Click on the icon to add libraries,
  • Select Kubernetes
  • You should have a new block category named Kubernetes
  • Play with it :)

Add your own Kubernetes blocks

  • Open KubernetesClientService.java to code the Quarkus RestAPI that will interact with Kubernetes
  • Open scratch-vm / extensions / scratch3_k8s / index.js to customize or add new blocks

That's it