I tried some solutions and one that is working at the moment is simply based to 
change my deployment.yaml every time.
I mean:

1) I have to deploy for the 1' time my application based on a pod with some 
containers. These pods should be deployed on every cluster node (I have 3 
nodes). I did the deployment setting in the yaml file the option replicas equal 
to 3:

apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1
kind: Deployment
metadata:
  name: my-deployment
  labels:
    app: webpod  
spec:
  replicas: 3
....

The version used for one of my containers is 2.1 for example


2) I execute the deployment with the command: kubectl apply -f 
my-deployment.yaml


3) I get one pod for every node without problem


4) Now I want to update the deployment changing the version of the image that I 
use for one of my containers. So I simply change the yaml file editing 2.1 with 
2.2. Then I re-launch the command: kubectl apply -f my-deployment.yaml


5) Again, I obtain one pod for every node without problem


Behavior very different if instead I use the command:
kubectl set image deployment/my-deployment my-container=xxxx:v2.2

In this case I get a situation where a node has 2 pod, a node 1 pod, last node 
without pod...

Anyway considering that changing the yaml file every time that I have to deploy 
a new version, is an acceptable constraint, is this a reliable solution or can 
it have negative repercussions on system stability?


  




-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to