Know Your Lab Environment

🎬 Watch Before You Begin

c8-labs Lab Environment
🧭 Video Timeline

In this video, you’ll see the lab architecture, GCP resources, Cloud Shell setup, Headlamp dashboard, and how to use log explorer / analytics.

  • [00:08]
    Walkthrough lab architecture diagram / GCP resources - Load balancer, Kubernetes cluster, Namespace, Headlamp etc
  • [02:30]
    Syncronise required scripts to run the labs via Cloud Shell
  • [05:20]
    Access to Kubernetes Dashboard via Headlamp
  • [08:10]
    Access to GCP Log Explorer / Analytics - to view logs throughout the install steps
  • [08:45]
    Video ends

Now that onboarding is complete, let's review how the Lab Environment is setup.
There are two broad aspects to the lab environment.

Lab Summary
  • Each participant will have access to a dedicated namespace (such as jon-doe-gmail-com-c8-labs) to deploy Camunda self-managed app components.
  • The lab instructions are primarily executed via GCP Cloud Shell. Please run all lab commands from within a single Cloud Shell terminal session.

Physical Setup

Here is a summary of the physical environment. (diagram below)

*Note: Cloudflare domain setup is outside the scope of the labs. It is however pre-configured for each participant.

Click on image to enlarge
Physical setup

GCP Cloud Shell: Sync GitHub project

Let's begin our work by launching a new GCP Cloud Shell.
From this point on, all commands are executed in the Cloud Shell. For convenience, you can use the Copy button to paste a logically grouped set of commands into Cloud Shell, or, if you prefer a slower pace with attention to detail, copy and run each command line by line.

Follow the instructions carefully. There are a few places where you may need to modify the command(s) before executing the same.
The scripts associated with this program are available in the GitHub repository.
Let's clone the Git repository to your GCP Cloud Shell.

Git clone using below command.

⚠️ Important: # Start from your home directory in Cloud Shell terminal window.


gcloud config set project c8-labs

git clone https://github.com/rchari-ml/c86-mini.git
cd c86-mini
git checkout c8-labs-swati
git fetch origin
git pull origin c8-labs-swati
gcloud components install gke-gcloud-auth-plugin
gke-gcloud-auth-plugin --version
gcloud container clusters get-credentials {{CLUSTER_NAME}} --region {{REGION}} --project c8-labs

!!! Note: If you see any errors such as below, please ignore the same. You may continue with the steps.

HTTP request failed after retries: response_data={'error': {'code': 404, 'message': 'Account not found for email: some-hash-code|user-email-address', 'status': 'NOT_FOUND'}}, retryable_error=False

Post Command-Set Execution: Click to view screen shot - Cloud Shell init success with k8s cluster.

Click on image to enlarge
Project Lens UI app


Kubernetes Dashboard for Resources Visualisation

Headlamp provides a web-based interface for visualizing and managing Kubernetes resources. During the labs, you'll use it to explore namespaces, workloads, services, pods, and other Kubernetes objects.
The webapp requires a token for user authentication. Use the command below to generate the token.


export UNAMESPACE={{UNAMESPACE}}

kubectl create token headlamp-svc-acct -n ${UNAMESPACE}

  • Open in a new tab: Kubernetes Dashboard
  • Click on Cluster Settings => Add your namespace under Allowed namespaces
  • Return to login page (click on Go to Cluster)
  • Copy-paste the token from the previous step and submit.
  • You are now on home page of Headlamp.
    Click on Clusters main => Namespaces list => click on your namespace

    Expected Result: Your namespace shows status Active

Post Command-Set Execution (a): Click to view screen shot - Headlamp Sign In
Click on image to enlarge
Headlamp UI app

Post Command-Set Execution (b): Click to view screen shot - Headlamp kubeconfig - Add your namespace.

Click on image to enlarge
Headlamp UI - Add your Namespace

Post Command-Set Execution (c): Click to view screen shot - Headlamp kubeconfig - Namespace is active !!

Click on image to enlarge
Headlamp UI app - Namespace is active


Observability / Log Analytics

# Open this URL to view Log Analytics - make sure you sign-in to GCP console
# Use this as a starting point and customise your query based on the debug scenario



https://console.cloud.google.com/logs/query;query=severity%3E%3DDEFAULT;storageScope=storage,projects%2F{{PROJECT_ID}}%2Flocations%2Fasia-south2%2Fbuckets%2Fc8-labs-training%2Fviews%2F_AllLogs;query=resource.type%3D%22k8s_container%22%0Aresource.labels.cluster_name%3D%22{{CLUSTER_NAME}}%22%0Aresource.labels.namespace_name%3D%22{{UNAMESPACE}}%22%0Aseverity%3E%3DDEFAULT;cursorTimestamp={{TODAY_TIMESTAMP}};duration=PT30M?project={{PROJECT_ID}}


Next: Landing Page