How to Resart Pod In kubernetes?
Last Updated :
23 Jul, 2025
Kubernetes is an open-source container orchestration tool that helps in scaling, deploying, and managing containerized applications. In Kubernetes, the pods are the smallest deployable unit. In this guide, I will first discuss what Kubernetes is. Then I will discuss what is pods in Kubernetes. After this, I will walk you through the different steps to restart a pod in Kubernetes.
What is Kubernetes?
Kubernetes is a container orchestration tool that helps in scaling, deploying, and managing containerized applications. Kubernetes follows a master-slave architecture. Here, the master node, also called the control plane, manages all the cluster operations. On the other hand, worker nodes help in deploying and executing containers. The master node consists of 4 main components, the API server, which helps in interacting with the Kubernetes cluster; the scheduler, which helps in scheduling the pods to run on which node; ETCD, which stores all the Kubernetes cluster data; and controls managers, which help in managing different controllers like deployments, replica sets, and many more. Apart from this, in the worker node, there is kubelet, which helps in managing the pod lifecycle on a node; container runtime, which helps in running the containers; and kube-proxy, which helps in managing the network rules in the pods.
Kubernetes provides a variety of features, such as:
- Autoscaling: Kubernetes provides both a horizontal pod autoscaler and a vertical pod autoscaler to scale up or down based on the amount of traffic the application receives.
- Autohealing: Kubernetes automatically starts a new pod if there is any pod failure or deletion.
- High Availability: Kubernetes provides a replica set controller, which helps in maintaining the desired number of pods running on a cluster.
- Deployment process: Kubernetes helps automate the deployment process by rolling out new updates with zero downtime.
- Roll Back: Kubernetes allows you to roll back with zero downtime to the previous version of the application if any issues occur in the current version of the application.
What is Pod in Kubernetes?
Pod is a smallest deployable unit in the Kubernetes . Pods encapsulate the application container , storage , network and other configurations . Each pod has its own IP . These pods can also interact with each other with these IP addresses . Kubernetes manages the lifecycle of the pods . Based on the traffic an application receives these pods can be scaled up or scaled down . Controllers like Deployment controllers helps in scaling , restarting and recovering pods form failures . In summary we can say pods are the simple deployable units which provides a flexible and scalable framework for orchestrating and deploying the containerized application in Kubernetes .
Pre-requisites
Before moving to next section make sure you have installed Minikube on your system . If not installed follow this Geeks For Geeks article Kubernetes Minikube to install Minikube on your system .
Steps to Restart Pod In Kubernetes
Method 1: Restart By Deleting Pod
Step 1: Create a cluster using minikube.
minikube start
.jpg)
Step 2: Create a deployment.
kubectl create deployment nginx-deployment --image=nginx --replicas=1

Step 3: See pod the status using the command below.
kubectl get pods

Step 4: Delete a pod from the cluster.
kubectl delete pod <pod-name>

Step 5: Again see the pod status. You will observe even the pod is deleted, another pod will automatically run.
kubectl get pods

Method 2: Restart Pod By Using Rollout Restart
You can also restart a pod by using kubectl rollout restart . Follow the step below to restart a pod:
Step 1: Create a deployment.
kubectl create deployment nginx-deployment --image=nginx --replicas=1

Step 2: Restart the pod using kubectl restart rollout. Here the running pod will be terminated and a new pod will immediately starts running.
kubectl rollout restart deployment nginx-deployment

Method 3: Restart Pod By using Deployment Scale Methods
You can also scale your deployment to 0, to delete a pod and again scale it desired number of pods. Follow the steps below to restart a pod.
Step 1: Create a deployment.
kubectl create deployment nginx-deployment --image=nginx --replicas=1

Step 2: Scale the deployment to 0.
kubectl scale deployment/nginx-deployment --replicas=0

Step 3: Again scale the deployment to desired number of pods.
kubectl scale deployment/nginx-deployment --replicas=1

Method 4: Restart Pod By Updating Image
You can also set the image to new latest image to restart the pod.
Step 1: Create a deployment.
kubectl create deployment nginx-deployment --image=nginx --replicas=1

Step 2: Update the image to restart the pod.
kubectl set image deployment/nginx-deployment nginx=nginx:latest

Method 5: Restart Pod By Replacing Specified Pod
You can also replace the pod specified to restart the pod. Follow the steps below.
Step 1: Create a deployment.
kubectl create deployment nginx-deployment --image=nginx --replicas=1

Step 2: Get the pod name and replace it.
kubectl get pod nginx-deployment-6c878976f6-klcw7 -o yaml | kubectl replace -f -

Conclusion
Here is this article you have first learned what is Kubernetes. Then you have learned what is pods in Kubernetes. After this you have create deployment on Kubernetes cluster. Then to restart a pod, you have deleted a pod from the Kubernetes cluster. Finally you have observed a new pod starts running automatically after deletion of the pod.
Similar Reads
DevOps Tutorial DevOps is a combination of two words: "Development" and "Operations." Itâs a modern approach where software developers and software operations teams work together throughout the entire software life cycle.The goals of DevOps are:Faster and continuous software releases.Reduces manual errors through a
7 min read
Introduction
What is DevOps ?DevOps is a modern way of working in software development in which the development team (who writes the code and builds the software) and the operations team (which sets up, runs, and manages the software) work together as a single team.Before DevOps, the development and operations teams worked sepa
10 min read
DevOps LifecycleThe DevOps lifecycle is a structured approach that integrates development (Dev) and operations (Ops) teams to streamline software delivery. It focuses on collaboration, automation, and continuous feedback across key phases planning, coding, building, testing, releasing, deploying, operating, and mon
10 min read
The Evolution of DevOps - 3 Major Trends for FutureDevOps is a software engineering culture and practice that aims to unify software development and operations. It is an approach to software development that emphasizes collaboration, communication, and integration between software developers and IT operations. DevOps has come a long way since its in
7 min read
Version Control
Continuous Integration (CI) & Continuous Deployment (CD)
Containerization
Orchestration
Infrastructure as Code (IaC)
Monitoring and Logging
Microsoft Teams vs Slack Both Microsoft Teams and Slack are the communication channels used by organizations to communicate with their employees. Microsoft Teams was developed in 2017 whereas Slack was created in 2013. Microsoft Teams is mainly used in large organizations and is integrated with Office 365 enhancing the feat
4 min read
Security in DevOps