user2405589
user2405589

Reputation: 968

How to deploy application to a different cluster within same google cloud project?

I have one google cloud project, but have 2 different kubernetes clusters. Each of these clusters have one node each.

I would like to deploy an application to a specific kubernetes cluster. The deployment defaults to the other cluster. How can I specify which kubernetes cluster to deploy my app to?

Upvotes: 1

Views: 116

Answers (1)

rajesh-nitc
rajesh-nitc

Reputation: 5549

See the cluster with which kubectl is currently communicating:

kubectl config current-context

Set the cluster with which you want kubectl to communicate:

kubectl config use-context my-cluster-name

See official docs here for more details

Upvotes: 2

Related Questions