Kubernetes 101: Excercise 5 for CKA (create a deployment, create a service for the deployment)

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


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


Leave as a comment: