Reputation: 8724
I would like to update image version for my running kubernetes pod.
My current config is:
spec:
containers:
- name: ADMIN_USER
valueFrom:
secretKeyRef:
key: jenkins-admin-user
name: jenkins
image: jenkins/jenkins:latest
I would like to update it to
spec:
containers:
- name: ADMIN_USER
valueFrom:
secretKeyRef:
key: jenkins-admin-user
name: jenkins
image: jenkins/jenkins:2.247
I have tried to run an apply as I understood by reading documentation kubectl apply -f jenkins.yaml --namespace=infrastructure
, but nothing changed (nor my pod was restarted automatically).
Can someone advice how to do this?
Upvotes: 0
Views: 1109
Reputation: 9222
You can use replace
kubectl replace -f jenkins.yaml --namespace=infrastructure
Upvotes: 1
Reputation: 680
Probably image: jenkins/jenkins:2.247
is the same as image: jenkins/jenkins:latest
and because of that, no update occurred.
Tip: Try to not use latest tag but to set the specific tag always.
Upvotes: 0