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:
Using images tagged latest
Saving configuration inside images
An application uses Kubernetes components unnecessarily
ubectl
Kubernetes
Production Non-Production
Limits
Health Probes
Helm
,
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 ( , , ...), :
A , B C
B , A C
C , B A
, A B
, A C
, B C
, 3
, , , .
:
"" (stage) , .
Β«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.
( ), , , :
, production.
.
.
, URL- , , , production!
, Production Non-Production . , , , Kubernetes prod / dev.
, , , :
Production
Pre Production (Shadow) β production,
Development ,
/
10. Limits
, Kubernetes, . , , , .
, ( ) .
, . , , . , .
Kubernetes β . / , (, - ), Kubenetes. vertical pod auto-scaler (VPA).