Kubernetes क्लस्टर डाउनटाइम के बिना अपग्रेड होता है


अपने Kubernetes क्लस्टर के लिए अपग्रेड प्रक्रिया


- Kubernetes . , . Kubernetes "Voluntary Disruption".


4 :


  1. .
  2. pod’ Kubernetes-
  3. pod'
  4. Kubernetes- PodDisruptionBudgets

(. . )


, Kubernetes .



, , . , lifecycle hooks, readiness probes Pod disruption budgets .


, . , Kubernetes , pod'a, Service:



pod’ Nginx Service Kubernetes-.


. ? , . , :


  • , pod’ . pod’ ? , , .
  • ? pod’ .

pod’ , , . , ( VM), . pod’ , pod’. kubectl drain.


pod’


drain pod’ . drain unschedulable ( NoSchedule). pod’. drain pod’ , , TERM pod’.


kubectl drain pod’, , drain:


  • TERM . pod’ , Kubernetes TERM , , , . , , pod’ , (, ).
  • pod’, . , pod’ , .


voluntary disruption, , , drain , Kubernetes :



Kubernetes pod’. , :


---
apiVersion: apps/v1
kind: Deployment
metadata:
 name: nginx-deployment
 labels:
   app: nginx
spec:
 replicas: 2
 selector:
   matchLabels:
     app: nginx
 template:
   metadata:
     labels:
       app: nginx
   spec:
     containers:
     - name: nginx
       image: nginx:1.15
       ports:
       - containerPort: 80
---
kind: Service
apiVersion: v1
metadata:
 name: nginx-service
spec:
 selector:
   app: nginx
 ports:
 - protocol: TCP
   targetPort: 80
   port: 80

Deployment, pod’ nginx . , Service, pod’ nginx .


, , Kubernetes .


Kubernetes AWS , Gruntwork.io.


:



All Articles