Following are the activity solutions for this chapter.
Chapter 2: Kubernetes Client Libraries
Activity: Using the Kubernetes Go Client inside the Cluster
- Create a deployment with the Docker image of the example client from the previous exercise:
kubectl run go-client --image=onuryilmaz/k8s-clientexample:go
- Wait until the pod is running by using the following command:
kubectl get pods -w
- Get the logs of the deployment pod with the following command:
kubectl logs $(kubectl get pods --selector run=go-client -o jsonpath="{.items[0].metadata.name}")