ManagedKafkaCluster
| Property | Value |
|---|---|
| Google Cloud Service Name | Managed Kafka |
| Google Cloud Service Documentation | /managed-service-for-apache-kafka/docs/ |
| Google Cloud REST Resource Name | v1beta1.projects.locations.clusters |
| Google Cloud REST Resource Documentation | /managed-service-for-apache-kafka/docs/reference/rest/v1/projects.locations.clusters |
| Config Connector Resource Short Names | gcpmanagedkafkacluster gcpmanagedkafkaclusters managedkafkacluster |
| Config Connector Service Name | managedkafka.googleapis.com |
| Config Connector Resource Fully Qualified Name | managedkafkaclusters.managedkafka.cnrm.cloud.google.com |
| Can Be Referenced by IAMPolicy/IAMPolicyMember | No |
| Config Connector Default Average Reconcile Interval In Seconds | 600 |
Custom Resource Definition Properties
Spec
Schema
capacityConfig: memoryBytes: integer vcpuCount: integer gcpConfig: accessConfig: networkConfigs: - subnetworkRef: external: string name: string namespace: string kmsKeyRef: external: string name: string namespace: string labels: string: string location: string projectRef: external: string kind: string name: string namespace: string rebalanceConfig: mode: string resourceID: string | Fields | |
|---|---|
|
Required |
Required. Capacity configuration for the Kafka cluster. |
|
Required |
Required. The memory to provision for the cluster in bytes. The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. Minimum: 3221225472 (3 GiB). |
|
Required |
Required. The number of vCPUs to provision for the cluster. Minimum: 3. |
|
Required |
Required. Configuration properties for a Kafka cluster deployed to Google Cloud Platform. |
|
Required |
Required. Access configuration for the Kafka cluster. |
|
Required |
Required. Virtual Private Cloud (VPC) networks that must be granted direct access to the Kafka cluster. Minimum of 1 network is required. Maximum 10 networks can be specified. |
|
Required |
|
|
Required |
Required. Reference to the VPC subnet in which to create Private Service Connect (PSC) endpoints for the Kafka brokers and bootstrap address. The subnet must be located in the same region as the Kafka cluster. The project may differ. Multiple subnets from the same parent network must not be specified. The CIDR range of the subnet must be within the IPv4 address ranges for private networks, as specified in RFC 1918. |
|
Optional |
The ComputeSubnetwork selflink of form "projects/{{project}}/regions/{{region}}/subnetworks/{{name}}", when not managed by Config Connector. |
|
Optional |
The `name` field of a `ComputeSubnetwork` resource. |
|
Optional |
The `namespace` field of a `ComputeSubnetwork` resource. |
|
Optional |
Optional. Immutable. The Cloud KMS Key name to use for encryption. The key must be located in the same region as the cluster and cannot be changed. |
|
Optional |
A reference to an externally managed KMSCryptoKey. Should be in the format `projects/[kms_project_id]/locations/[region]/keyRings/[key_ring_id]/cryptoKeys/[key]`. |
|
Optional |
The `name` of a `KMSCryptoKey` resource. |
|
Optional |
The `namespace` of a `KMSCryptoKey` resource. |
|
Optional |
Optional. Labels as key value pairs. |
|
Required |
|
|
Required |
The Project that this resource belongs to. |
|
Optional |
The `projectID` field of a project, when not managed by Config Connector. |
|
Optional |
The kind of the Project resource; optional but must be `Project` if provided. |
|
Optional |
The `name` field of a `Project` resource. |
|
Optional |
The `namespace` field of a `Project` resource. |
|
Optional |
Optional. Rebalance configuration for the Kafka cluster. |
|
Optional |
Optional. The rebalance behavior for the cluster. When not specified, defaults to `NO_REBALANCE`. |
|
Optional |
The GCP resource identifier. If not given, the metadata.name will be used. |
Status
Schema
conditions: - lastTransitionTime: string message: string reason: string status: string type: string externalRef: string observedGeneration: integer observedState: createTime: string state: string updateTime: string | Fields | |
|---|---|
conditions |
Conditions represent the latest available observations of the object's current state. |
conditions[] |
|
conditions[].lastTransitionTime |
Last time the condition transitioned from one status to another. |
conditions[].message |
Human-readable message indicating details about last transition. |
conditions[].reason |
Unique, one-word, CamelCase reason for the condition's last transition. |
conditions[].status |
Status is the status of the condition. Can be True, False, Unknown. |
conditions[].type |
Type is the type of the condition. |
externalRef |
A unique specifier for the ManagedKafkaCluster resource in GCP. |
observedGeneration |
ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. |
observedState |
ObservedState is the state of the resource as most recently observed in GCP. |
observedState.createTime |
Output only. The time when the cluster was created. |
observedState.state |
Output only. The current state of the cluster. |
observedState.updateTime |
Output only. The time when the cluster was last updated. |
Sample YAML(s)
ManagedKafkaCluster Basic
# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. apiVersion: managedkafka.cnrm.cloud.google.com/v1beta1 kind: ManagedKafkaCluster metadata: name: managedkafkacluster-sample spec: projectRef: # Replace ${PROJECT_ID?} with your project ID. external: ${PROJECT_ID?} location: us-central1 capacityConfig: vcpuCount: 3 memoryBytes: 3221225472 # 3GB gcpConfig: accessConfig: networkConfigs: - subnetworkRef: name: managedkafkacluster-dep rebalanceConfig: mode: NO_REBALANCE --- apiVersion: compute.cnrm.cloud.google.com/v1beta1 kind: ComputeNetwork metadata: name: managedkafkacluster-dep spec: autoCreateSubnetworks: false --- apiVersion: compute.cnrm.cloud.google.com/v1beta1 kind: ComputeSubnetwork metadata: name: managedkafkacluster-dep spec: region: us-central1 networkRef: name: managedkafkacluster-dep ipCidrRange: 10.0.0.0/24 ManagedKafkaCluster Cmek
# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. apiVersion: managedkafka.cnrm.cloud.google.com/v1beta1 kind: ManagedKafkaCluster metadata: name: managedkafkacluster-sample-cmek spec: projectRef: # Replace ${PROJECT_ID?} with your project ID external: ${PROJECT_ID?} location: us-central1 capacityConfig: vcpuCount: 3 memoryBytes: 3221225472 # 3GB gcpConfig: accessConfig: networkConfigs: - subnetworkRef: name: managedkafkacluster-dep-cmek kmsKeyRef: name: managedkafkacluster-dep-cmek rebalanceConfig: mode: NO_REBALANCE --- apiVersion: compute.cnrm.cloud.google.com/v1beta1 kind: ComputeNetwork metadata: name: managedkafkacluster-dep-cmek spec: autoCreateSubnetworks: false --- apiVersion: compute.cnrm.cloud.google.com/v1beta1 kind: ComputeSubnetwork metadata: name: managedkafkacluster-dep-cmek spec: region: us-central1 networkRef: name: managedkafkacluster-dep-cmek ipCidrRange: 10.0.0.0/24 --- # Replace ${PROJECT_ID?} and ${PROJECT_NUMBER?} below with your desired project # ID and project number. apiVersion: iam.cnrm.cloud.google.com/v1beta1 kind: IAMPolicyMember metadata: name: managedkafkacluster-dep-cmek spec: resourceRef: apiVersion: kms.cnrm.cloud.google.com/v1beta1 kind: KMSCryptoKey name: managedkafkacluster-dep-cmek memberFrom: serviceIdentityRef: name: managedkafkacluster-dep-cmek role: roles/cloudkms.cryptoKeyEncrypterDecrypter # required by managedkafka service agent to access KMS keys --- apiVersion: kms.cnrm.cloud.google.com/v1beta1 kind: KMSCryptoKey metadata: annotations: # Replace ${PROJECT_ID?} with your project ID. cnrm.cloud.google.com/project-id: ${PROJECT_ID?} name: managedkafkacluster-dep-cmek spec: keyRingRef: name: managedkafkacluster-dep-cmek purpose: ENCRYPT_DECRYPT --- apiVersion: kms.cnrm.cloud.google.com/v1beta1 kind: KMSKeyRing metadata: annotations: # Replace ${PROJECT_ID?} with your project ID. cnrm.cloud.google.com/project-id: ${PROJECT_ID?} name: managedkafkacluster-dep-cmek spec: location: us-central1 --- apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1 kind: ServiceIdentity metadata: name: managedkafkacluster-dep-cmek annotations: cnrm.cloud.google.com/deletion-policy: "abandon" spec: projectRef: # Replace ${PROJECT_ID?} with your project ID. external: ${PROJECT_ID?} resourceID: managedkafka.googleapis.com