purple-electrician-80135
03/02/2023, 12:54 AMpython inline source runtime error: 'Cluster' object is not callable
From this code:
def create_gks_autopilot_cluster(project_id, name, region, network_id, subnet_id):
gke_min_version = "1.25.6-gke.200"
default = gcp.serviceaccount.Account("default",
account_id="service-account-id",
display_name="Service Account")
# Define the GKE Autopilot cluster
gke_cluster = gcp.container.Cluster(name,
enable_autopilot=True,
ip_allocation_policy=container.ClusterIpAllocationPolicyArgs(
cluster_secondary_range_name="pods",
services_secondary_range_name="services",
),
location=region,
min_master_version=gke_min_version,
network=network_id,
release_channel={"channel": "STABLE"},
subnetwork=subnet_id,
project=project_id,)
return gke_cluster
Is there anything obvious I should be doing differently? .. this is running in a Jupyter notebook .. which has made configs unavailable (probably due being unable to find the .yaml file) but otherwise seems to work.