Welcome to this demo to add new blocks to Scratch to interact with your Kubernetes cluster.
Make sure that you are connected into a valid Kubernetes cluster (for instance with the Openshift view or Kubernetes view).
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.
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 :)
- 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