Reputation: 1289
Is it possible to update an external loadbalancer service in kubernetes with a new spec from an yaml file.
I can do rolling updates of the deployments but how can I update services, primarily not changing the external IP address.
Thanks, Rajesh
Upvotes: 6
Views: 15420
Reputation: 18403
If you do not want to edit on the living or already deployed manifest file. you can edit the service manifest file on your computer and use apply action instead of create. For instance,
kubectl apply -f service-manifest.yaml
It will work without changing already existing external IPs
Upvotes: 6
Reputation: 1289
I think I have the answer
env KUBE_EDITOR="nano" kubectl edit svc/my-service
And I can edit the service with the new selector/labels.
I am not sure if there is a better option
Upvotes: 2