Setup Tools
Please follow these steps to prepare for the Kubernetes Extensions lab:
1. Install Operator SDK
The Cloud Shell comes with several tools/libraries. For the lab, we will use the operator-sdk cli, which depends on Go to be installed. To check if both tools are installed in your shell, runn the following commands.
go versionoperator-sdk versionIf you see a command not found error, you will need to install both. For detailed installation instructions go here.
The version of the operator SDK used in the lab is 0.18.2. If the version shown from the above command is not 0.18.2, we need to install it.
curl -LO https://github.com/operator-framework/operator-sdk/releases/download/v0.18.2/operator-sdk-v0.18.2-x86_64-linux-gnuchmod +x operator-sdk-v0.18.2-x86_64-linux-gnumkdir $HOME/operatorsdk0182cp operator-sdk-v0.18.2-x86_64-linux-gnu $HOME/operatorsdk0182/operator-sdkrm operator-sdk-v0.18.2-x86_64-linux-gnuecho 'export PATH=$HOME/operatorsdk0182:$PATH' > .bash_profilesource .bash_profileCheck again,
operator-sdk version2. Configure Kubectl
If you have not setup your kubectl to access your cluster, you can do so in the terminal environment
Login to IBM Cloud using
ibmcloud login. If asked, chooseAdvoworkas your target account.Run the
ibmcloud ks clusterscommand to verify the terminal and setup for access to the clusteribmcloud ks clustersConfigure the
kubectlcli available within the terminal for access to your cluster. If you previously stored your cluster name to an environment variable, use that (ie.$CLUSTER_NAME), otherwise copy and paste your cluster name from the previous commands output to the$CLUSTER_NAMEportion below.ibmcloud ks cluster config --cluster $CLUSTER_NAMEVerify access to the Kubernetes API by getting the namespaces.
kubectl get namespaceYou should see output similar to the following, if so, then your're ready to continue.
NAME STATUS AGE
default Active 125m
ibm-cert-store Active 121m
ibm-system Active 124m
kube-node-lease Active 125m
kube-public Active 125m
kube-system Active 125mLast updated
Was this helpful?