![]() What is Service Discovery in Kubernetes?Ī. ![]() ![]() This provides an externally accessible IP address that sends traffic to the correct port on your cluster nodes, provided your cluster runs in a supported environment and is configured with the correct cloud load balancer provider package. When creating a Service, you have the option of automatically creating a cloud load balancer. Pods can be configured to talk to the Service and know that communication to the Service will be automatically load-balanced out to some pod that is a member of the Service.Ī. This address is tied to the lifespan of the Service and will not change while the Service is alive. When created, each Service is assigned a unique IP address (also called clusterIP). A Kubernetes Service is an abstraction that defines a logical set of Pods running somewhere in your cluster, that all provide the same functionality. Kubernetes transparently routes incoming traffic on the NodePort to your service, even if your application is running on a different node.Ī. A NodePort is an open port on every node of your cluster. – Pause & Resume Rollout/Rollback functionsĪ. – Rolling back to old versions of applications through old Replica Sets – Rolling out new versions of the application through new Replica Sets – Managing a set of pods in the form of Replica Sets & Hash-based labels K8s deployment controller is responsible for the following functions It maintains multiple replica sets, and when you describe the desired state, the DC changes the actual state at the correct pace. A K8s deployment controller object is utilized for monitoring, management of upgrades, downgrade and scaling of services (e.g., pods) without any disruption or downtime. There is no point in maintaining the same spec repeated for multiple revisions, so Kubernetes removes Revision 1 since we have the latest Revision 3 of the same spec.Ī. If you check the rollout history once again, you can see that Revision 1 has been used to create the latest pods tagging it with Revision 3. Like the Rolling Update Deployment, the Rollback Deployment terminates the current pods and replaces them with the pods containing the spec from Revision 1. $kubectl rollout undo deploy test-nginx -to-revision=1 How to roll back to the previous version of the application?Ī. #kubectl rollout history deployment kubeserve Use this command to view the rollout history: #kubectl set image deployments/kubeserve app=linuxacademycontent/kubeserve:v2 -v 6ģ.Use this command to view the additional ReplicaSet created during the update:Ĥ.Use this command to verify all pods are up and running:ĥ. Perform a Rolling Update to Version 2 of the Application, and Verify Its Successġ.Use this curl loop command to see the version change as you perform the rolling update:Ģ.Use this command to perform the update (while the curl loop is running): #kubectl expose deployment kubeserve -port 80 -target-port 80 -type NodePortĢ.Use the following command to verify the service is present and collect the cluster IP: #kubectl scale deployment kubeserve -replicas=5Ģ.Use the following command to verify the additional replicas have been created:Ĭreate a Service So Users Can Access the Applicationġ.Use the following command to create a service for your deployment: Scale Up the Application to Create High Availabilityġ.Use the following command to scale up your application to 5 replicas: #kubectl rollout status deployments kubeserveĤ.Use the following command to verify the app is at the correct version: #kubectl apply -f kubeserve-deployment.yaml –recordģ.Use the following command to verify the deployment was successful: 1.Create the kubeserve-deployment.yaml file, and add the following YAML to create your deploymentĢ.Use the following command to create the deployment: How to Rollout a new version of the application?Ī.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |