That's what I mean - replace really requires a read-modify-write, so you can read back the immutable field.
On Thu, Oct 20, 2016 at 7:48 AM, Norman Khine <nor...@khine.net> wrote: > i am trying to update a service not a pod > > ➜ k8s git:(master) ✗ kubectl replace -f > templates/services/dev/service-media-feature.yaml (git)-[master] > The Service "media-feature" is invalid. > spec.clusterIP: Invalid value: "": field is immutable > > whereas apply works and updates the Service > > thanks for your help > > > On 20 October 2016 at 15:35, 'Tim Hockin' via Kubernetes user discussion and > Q&A <kubernetes-users@googlegroups.com> wrote: >> >> Kubectl replace requires you to read-modify-write to avoid immutable >> fields, but apply is "gentler" and generates a patch. >> >> On Oct 20, 2016 6:54 AM, "Rodrigo Campos" <rodrig...@gmail.com> wrote: >>> >>> Yes, modify the file and do kubectl apply -f <file> >>> >>> On Thursday, October 20, 2016, Norman Khine <nor...@khine.net> wrote: >>>> >>>> Hello, I have the following pod, which has 3 containers: >>>> >>>> apiVersion: extensions/v1beta1 >>>> kind: Deployment >>>> metadata: >>>> name: app-feature >>>> labels: >>>> pod: app >>>> track: feature >>>> spec: >>>> replicas: 3 >>>> template: >>>> metadata: >>>> labels: >>>> pod: app >>>> track: feature >>>> spec: >>>> containers: >>>> - name: app-api >>>> image: quay.io/.../api:feature_swagger >>>> imagePullPolicy: Always >>>> ports: >>>> - containerPort: 3000 >>>> - name: app-media >>>> image: quay.io/.../media:feature_kube >>>> imagePullPolicy: Always >>>> ports: >>>> - containerPort: 4000 >>>> - name: phantom >>>> image: docker.io/wernight/phantomjs:2.1.1 >>>> command: ["phantomjs", "--webdriver=8910", >>>> "--web-security=no", "--load-images=false", >>>> "--local-to-remote-url-access=yes"] >>>> ports: >>>> - containerPort: 8910 >>>> resources: >>>> requests: >>>> memory: 1000 >>>> restartPolicy: Always >>>> imagePullSecrets: >>>> # we download these from quay.io account >>>> - name: pull-secret >>>> >>>> >>>> >>>> This is the service file i have: >>>> >>>> apiVersion: v1 >>>> kind: Service >>>> metadata: >>>> name: media-dev >>>> annotations: >>>> service.beta.kubernetes.io/aws-load-balancer-ssl-cert: >>>> arn:aws:acm:us-east-1:XXX:certificate/XXX >>>> service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http >>>> service.beta.kubernetes.io/aws-load-balancer-ssl-ports: https >>>> spec: >>>> type: LoadBalancer >>>> selector: >>>> pod: app >>>> track: develop >>>> ports: >>>> - name: http >>>> port: 80 >>>> targetPort: 4000 >>>> - name: https >>>> port: 443 >>>> targetPort: 4000 >>>> >>>> How do I change the selector for this loadBalancer to track `feature` >>>> instead of `develop` - is it possible to modify for an existing Service >>>> without having to create a new service? >>>> >>>> Any advise is much appreciated >>>> >>>> -- >>>> 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. >>> >>> -- >>> 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. >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Kubernetes user discussion and Q&A" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/kubernetes-users/tqtPsS7t3hw/unsubscribe. >> To unsubscribe from this group and all its topics, 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. > > > > > -- > %>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-83)%26) for > c in ",adym,*)&uzq^zqf" ] ) > > -- > 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. -- 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.