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

Exercise 5:

  • Create a nginx deployment and check the deployments
  • Create a service from the nginx deployment

Solution:

kubectl get nodes

kubectl run nginx --image=nginx



kubectl get deployments

kubectl expose deployment nginx --port 80 --type NodePort

kubectl get services



#In case you do a typo like me, this is an easy command to delete the current deployment

kubectl delete deployment ngnix


Brando Sabatini and Ikbal C ©. Powered by Blogger.