You can specify node selectors in a deployment, for example. But you can check kubectl drain too, it really depends on what you want to do :)
On Thursday, August 3, 2017, 'David Oppenheimer' via Kubernetes user discussion and Q&A <kubernetes-users@googlegroups.com> wrote: > You can't move a pod. What you want is a Deployment or ReplicaSet. > > > On Wed, Aug 2, 2017 at 10:11 PM, <shayb...@gmail.com > <javascript:_e(%7B%7D,'cvml','shayb...@gmail.com');>> wrote: > >> >> here is my yml file: >> -------------------------- >> kind: Pod >> apiVersion: v1 >> metadata: >> name: pod-name >> spec: >> containers: >> - name: con-name >> image: ubuntu >> restartPolicy: "Never" >> nodeSelector: >> kubernetes.io/hostname: node1 >> -------------------------- >> >> kubectl create -f my.yml >> >> But now I want move it to node2 : means to delete and create this pod on >> node2. >> is there a way in kubernetes that i can just update the nodeSelector to >> node2 and then kubernetes will delete it on node1 and create it on node2? >> >> or i must run it manually? (delete the pod on node1 and then create it on >> node2) >> >> Thanks a lot >> >> -- >> 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 >> <javascript:_e(%7B%7D,'cvml','kubernetes-users%2bunsubscr...@googlegroups.com');> >> . >> To post to this group, send email to kubernetes-users@googlegroups.com >> <javascript:_e(%7B%7D,'cvml','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. >> > > -- > 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 > <javascript:_e(%7B%7D,'cvml','kubernetes-users%2bunsubscr...@googlegroups.com');> > . > To post to this group, send email to kubernetes-users@googlegroups.com > <javascript:_e(%7B%7D,'cvml','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. > -- 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.