A pod is a collection of containers sharing a network, acting as the basic unit of deployment in Kubernetes. All containers in a pod are scheduled on the same node.
1: kubectl scale
Scale the number of replicas using the kubectl command scale and set the replicas flag to zero:
kubectl scale deployment <deployment_name> --replicas=0 -n <namespace>
Scale the number of replicas using the kubectl command scale and set the replicas flag to its original value:
kubectl scale deployment <deployment_name> --replicas=2 -n <namespace>
2: kubectl rollout restart
kubectl rollout restart deployment <deployment_name> -n <namespace>
3: kubectl delete pod
It will automatically recreate the pod to keep it consistent with the expected one.
kubectl delete pod <pod_name> -n <namespace>