To view a cluster, you can use the Google Cloud console, the Google Cloud CLI, the client library, or the Managed Kafka API. You can't use the open source Apache Kafka API to view a cluster.
Required roles and permissions to view a cluster
To get the permissions that you need to view a cluster,
ask your administrator to grant you the
Managed Kafka Viewer (roles/managedkafka.viewer
) IAM role on your project.
For more information about granting roles, see Manage access.
This predefined role contains the permissions required to view a cluster. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to view a cluster:
-
List clusters:
managedkafka.clusters.list
-
Get cluster details:
managedkafka.clusters.get
You might also be able to get these permissions with custom roles or other predefined roles.
For more information about the Managed Kafka Viewer role, see Managed Service for Apache Kafka predefined roles.
View a cluster
To view a cluster, follow these steps:
Console
-
In the Google Cloud console, go to the Cluster page.
The clusters you created in a project are listed.
- To view a specific cluster, click a cluster name.
- The cluster details page opens. This page has the following tabs:
- Resources: Displays the list of topics and consumer groups associated with the cluster.
- Configurations: Displays the configuration of the cluster, including the list of subnets associated with the cluster.
- Monitoring: Displays the monitoring alerts associated with the cluster.
- Logs: Displays the logs related to clusters from Logs Explorer.
gcloud
-
In the Google Cloud console, activate Cloud Shell.
At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.
Run the
gcloud beta managed-kafka clusters describe
command:gcloud beta managed-kafka clusters describe CLUSTER_ID \ --location=LOCATION
Replace the following:
CLUSTER_ID: The ID or name of the cluster.
LOCATION: The location of the cluster.