This page describes how to manage your GKE On-Prem clusters.
Before you begin
SSH into your admin workstation:
ssh -i ~/.ssh/vsphere_workstation ubuntu@[IP_ADDRESS]
Log in to Google Cloud using your account credentials:
gcloud auth login
Set a default project. Setting a default Google Cloud causes all Cloud SDK commands to run against the project, so that you don't need to specify your project for each command:
gcloud config set project [PROJECT_ID]
[PROJECT_ID]with your project ID. (You can find your project ID in Cloud Console, or by running
gcloud config get-value project.)
Viewing your clusters
kubectl get clusters --kubeconfig [ADMIN_CLUSTER_KUBECONFIG]
If you chose to register your clusters with Google Cloud by populating
gkeconnect field of the GKE On-Prem configuration file,
you can view your clusters in Cloud Console. To learn more, see
Viewing registered clusters
in the Connect documentation.
Connecting to your clusters
If you want to connect to your clusters, you have two options:
- You can SSH into cluster nodes.
- If you registered your clusters with Google Cloud, you can log in to clusters from Cloud Console.
Checking cluster version
kubectl get cluster --kubeconfig [USER_CLUSTER_KUBECONFIG] -o yaml | grep bundle.gke.io/version
The cluster's version is the same as the bundle version returned by this command.
Get the Pods in the admin cluster's
kubectl get pods --kubeconfig [ADMIN_CLUSTER_KUBECONFIG] -n kube-system
For the Pod prefixed with
clusterapi-controllers, get the Pod's
configuration. For example:
kubectl get pod clusterapi-controllers-677f8b7bbd-zb4r6 --kubeconfig kubeconfig -o yaml -n kube-system | grep image:.*controller-manager
The cluster's version is the same as the image version returned by this command.