With Connect, you can use the Google Cloud Console to manage your user clusters. Each user cluster that you create automatically runs the Connect Agent and is registered with Connect. For more information, see Connect overview.
Before you begin
Before you start using Anthos clusters on AWS, make sure you have performed the following tasks:
- Complete the Prerequisites.
- Install a management service.
- Create a user cluster.
Logging into your cluster with Connect
You can use the Google Cloud Console to view, monitor, debug, and manage workloads on your user clusters.
To log into your user clusters:
From your
anthos-aws
directory, useanthos-gke
to switch context to your user cluster.cd anthos-aws env HTTP_PROXY=http://localhost:8118 \ anthos-gke aws clusters get-credentials CLUSTER_NAME
From a command line, use
kubectl
to set up a Kubernetes service account and a token in thekube-system
namespace.This topic assumes the name of the service account is
admin-user
.env HTTP_PROXY=http://localhost:8118 \ kubectl create serviceaccount -n kube-system admin-user
Create a ClusterRoleBinding between the
cluster-admin
role and the Kubernetes service account.env HTTP_PROXY=http://localhost:8118 \ kubectl create clusterrolebinding admin-user-binding \ --clusterrole cluster-admin --serviceaccount kube-system:admin-user
Get the service account's Secret with
kubectl
.SECRET_NAME=$(env HTTP_PROXY=http://localhost:8118 \ kubectl get serviceaccount -n kube-system admin-user \ -o jsonpath='{$.secrets[0].name}') env HTTP_PROXY=http://localhost:8118 \ kubectl get secret -n kube-system ${SECRET_NAME} -o jsonpath='{$.data.token}' \ | base64 -d | sed $'s/$/\\\n/g'
Copy the secret to your clipboard.
In your browser, visit the Connect Clusters page.
Select the cluster under Anthos managed clusters
Click the Login button in the right-side pane.
Select Token and paste the Kubernetes token you copied earlier. Click Login.
What's next
Read the full documentation on Logging into clusters with Connect.
Learn about multi-cluster management with Connect.