You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I want to deploy a pod name core-x but that pod is already running in my cluster what I want is to overwrite the old one with the new one.
Knowing that my image version has the same tag?
I need your help please
@yosser_mahfoudh you can't create a new pod with the same name and you can't change name of the existing pod too since name and namespace fields are immutable. Some of the fields can be changed though.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So if I create a new pod named core-Y. how the core-X stop runing in my kubernetes cluster?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That would be "kubectl delete pod $podName -n $namespace" if you're using kubectl.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes. Perhaps, to delete the pod you don't need to run any sed against yaml. It'll be deleted as long as a pod with such a name exists in the namespace (its spec does not really matter)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried what you said but it deletes it and never restart creating the pod from the begin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@yosser_mahfoudh yes, this is what delete command is expected to do. In the next step you can apply again (I'd recommend adding a 10-15 second sleep to give apiserver time to delete the pod).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
do you mean like this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@yosser_mahfoudh I was more thinking about a new step. So your steps in the pipeline would differ by one command only.
Also, I'd recommend looking at an official K8s documentation and play with kubectl and your pod yaml in the command line to better understand kubectl and cluster behavior.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.