Deployment anti-patterns in Kubernetes. Part 2

This is the second part of the Kubernetes Deployment Antipatterns tutorial . We also recommend that you familiarize yourself with the first part .





List of anti-patterns that we will look at:





  1. Using images tagged latest





  2. Saving configuration inside images





  3. An application uses Kubernetes components unnecessarily













  4. ubectl





  5. Kubernetes









  6. Production Non-Production





  7. Limits





  8. Health Probes





  9. Helm





  10. ,









  11. Kubernetes





6. ubectl

kubectl



Kubernetes. .





, production , kubectl



. , , 3 , , .





kubectl get ns
kubectl get pods -n sales
kubectl describe pod prod-app-1233445 -n sales
kubectl get svc -n sales
kubectl describe...
      
      



Kubernetes , , . kubectl -, , , .





, .





, . Kubernetes.





, Kubevious, Kubernetes, Kubernetes .





7. Kubernetes

, , . Kubernetes , . , - Load Balancer



, Cluster IP



, Node Port



, Ingress.





luster IP



, Node Port



, , .





β€” , Kubernetes DNS. , .





, Service Mesh . Service Mesh Kubernetes. , .





, , . Kubernetes, .





, , . 5 , , 100 , ​​500 -. , .





8.

, , , production.





β€” (QA / Staging / Production), . «», .





, , . .





, - , , . 3 ( , , ...), :





  1. A , B C





  2. B , A C





  3. C , B A





  4. , A B





  5. , A C





  6. , B C





  7. , 3





, , , .





:





  1. "" (stage) , .





  2. Β«stagingΒ» , ( staging ).





- , , , . , , , , , .





, (staging) , , .





, , , , . Kubernetes :





, , Pull Request , Pull Request . , Pull Request / .





β€” . A, B, :





git checkout master
git checkout -b feature-a-b-together
git merge feature-a
git merge feature-b
git push origin feature-a-b-together
      
      



, : feature-a-b-together.staging.company.com



  staging.company.com/feature-a-b-together



.





, , Kubernetes.





, , staging , , , A / B . . Β« , Β» β€” .





, , , .





9. Production Non-Production

, Kubernetes , . : .





, Production Non-Production .





, , .





. Kubernetes, , . Kubernetes, .





Kubernetes . Kubernetes, . , production.





( ), , , :





  1. , production.





  2. .





  3. .





  4. , URL- , , , production!





, Production Non-Production . , , , Kubernetes prod / dev.





, , , :





  1. Production





  2. Pre Production (Shadow) β€” production,





  3. Development ,





  4. /









10. Limits

, Kubernetes, . , , , .





, ( ) .





, . , , . , .





Kubernetes β€” . / , (, - ), Kubenetes. vertical pod auto-scaler (VPA).








All Articles