Skip to content

2. Hello App

What Will You Do

For this exercise,

  • You will configure and deploy a simple "Hello App" as a Kubernetes deployment on your cluster
  • You will use the provided Kubernetes YAML for the "Hello App"

Notice that you will NOT require inbound access to the Kubernetes cluster's control plane for deployment, debugging or diagnostics. You will not require kubectl or kube config and the target Kubernetes cluster's control plane can be completely cloaked.


Assumptions

You have already provisioned or imported one or more Kubernetes clusters using the Controller


Step 1: Create and Configure Workload

  • Login into the Web Console
  • Click on "New Workload", provide a name
  • Select "Native Yaml" for Package Type
  • Select a namespace where you would like to deploy.

Create Workload


Step 2: Upload YAML File

The YAML file describes a "Kubernetes Deployment" that runs the helloapp container image available from GCR. We will be using this to create a Kubernetes Deployment object.

Copy the YAML file below and save it as a file called "helloapp.yaml"

apiVersion: apps/v1
kind: Deployment
metadata:
  name: helloweb
  labels:
    app: hello
spec:
  selector:
    matchLabels:
      app: hello
      tier: web
  template:
    metadata:
      labels:
        app: hello
        tier: web
    spec:
      containers:
      - name: hello-app
        image: gcr.io/google-samples/hello-app:1.0
        ports:
        - containerPort: 8080

Configure Workload


Step 3: Place and Deploy

  • Click on "Save and Go To Placement"
  • Select the cluster where you would like to deploy the "Hello App" YAML file

Placement

  • Navigate to the "Publish" and click on Publish.

Publish

Step 4: Debug

  • Once publish is successful, click on "Debug". You should see the pods for "Hello App" in a "Running" state.

Pod Status

  • Now, click on "Launch" under "Logs and Shell". This will launch a debug window where the user can view real time logs and is presented with a shell to the pod.

Debug Pod


Recap

Congratulations! You have successfully deployed the "Hello App" on your Kubernetes Cluster.