Skip to content

Instantly share code, notes, and snippets.

Task 1: Create a project jumphost instance
Navigation menu > Compute engine > VM Instance
Task 2: Create a Kubernetes service cluster
gcloud config set compute/zone us-east1-b
gcloud container clusters create nucleus-webserver1
Questions are not from any actual exam!!!
Q: Create a job that calculates pi to 2000 decimal points using the container with the image named perl
and the following commands issued to the container: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
Once the job has completed, check the logs to and export the result to pi-result.txt.
Solution:
#############################################################
# Run this script from the same location of the ign files #
#############################################################
########################## Installing govc #################################################
# mkdir $HOME/bin
# cd $HOME/bin
# wget https:////github.com/vmware/govmomi/releases/download/v0.22.1/govc_linux_amd64.gz
# gunzip govc_linux_amd64.gz && mv govc_linux_amd64 govc && chmod +x govc