Kubernetes 101: Excercise 6 for CKA (working with namespaces)


Following our journey on the preparation towards the exam CKA (Certified Kubernetes Administrator), we continue this time with the exercise number 6. 

Exercise 6:

Important: In your environment you are not gonna have these names or pods if you do not create them first so please visit this exercise to create them firsr -> Exercise .....

  • Create a namespace called dev
  • Copy the list of the current namespaces inside the cluster in the file /home/cloud_user/namespace.txt
  • Find the Pod namespace quark and check in which namespace the pod is in it, then save the name of this namespace on the file /home/cloud_user/quark-namespace.txt

Solution:

kubectl get nodes

kubectl get namespaces

kubectl create namespace dev

kubectl get namespaces
kubectl get namespace > /home/cloud_user/namespaces.txt
cat namespaces.txt
kubectl get pods --all-namespaces
nano /home/cloud_user/quark-namespace.txt


Comments

Leave as a comment:

Archive