cdudek
cdudek

Reputation: 133

Google Cloud Platform Kubernetes-engine, updating a service while keeping the external IP address

I have a question. I’m deploying an API with kubernetes-engine to cloud-endpoint. My problem is, every time I create the deployment and service I’m getting a new external API address.

At the moment I have to the delete the service and then create it again. With

kubectl delete -f deployment.yaml
kubectl create -f deployment.yaml

Is there a different solution so I can keep my external IP address? I have this API behind my own domain and don’t want to update the DNS everytime I deploy a new version of it.

Thank you for your help!

Upvotes: 0

Views: 48

Answers (1)

cdudek
cdudek

Reputation: 133

it's as easy as

kubectl apply -f deployment.yaml

you can also use kubectl apply instead of kubectl create

Upvotes: 1

Related Questions