Posts

Showing posts with the label service

Kubernetes Deployment for Zero Downtime

Image
Introduction In Kubernetes (K8s) , a Pod is the smallest resource unit used to run one or more containers during deployment. There are several ways to create a Pod : you can create it directly, use a ReplicationController , or a ReplicaSet . However, the most commonly used resource for managing Pods is the Deployment . When you use a Deployment , it actually creates a ReplicaSet to manage the Pods but comes with many additional benefits that support the deployment process. Some Advantages of Deployment : Ensures Pod Availability : It guarantees that the specified number of Pods are always running according to the configuration, automatically deploying additional Pods if any failures occur. Supports Restart and Undo Deployment : Allows you to easily restart or roll back to previous versions of your Deployment . Zero Downtime Deployment : When updating configurations or scaling Deployments , zero downtime is crucial. This means that new Pods are created while the old Pods are stil...

Setting Up an EXTERNAL-IP for Local LoadBalancer Service

Image
Introduction If you've used a LoadBalancer service from a Cloud Provider , you'll know how convenient it is to have an EXTERNAL-IP assigned automatically. However, when using local Kubernetes , the default setting doesn't provide an EXTERNAL-IP . Building on our previous discussion, this guide will show you how to use ` cloud-provider-kind ` to assign an EXTERNAL-IP to your local LoadBalancer service . First, make sure you've set up your local Kubernetes using Kind as outlined in my previous guide. This is necessary to proceed with the next steps. Installing cloud-provider-kind Since this is a Go package , you'll need to install Go first. Then, you can install the package with the following steps: go install sigs.k8s.io/cloud-provider-kind@latest Then execute command to use: cloud-provider-kind Keep in mind that you need to keep the terminal running while using Kubernetes to create the EXTERNAL-IP . Testing with local EXTERNAL-IP Create a deployment and e...