Class: Google::Apis::ContainerV1::Cluster

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/container_v1/classes.rb,
generated/google/apis/container_v1/representations.rb,
generated/google/apis/container_v1/representations.rb

Overview

A Google Kubernetes Engine cluster.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Cluster

Returns a new instance of Cluster



537
538
539
# File 'generated/google/apis/container_v1/classes.rb', line 537

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#addons_configGoogle::Apis::ContainerV1::AddonsConfig

Configuration for the addons that can be automatically spun up in the cluster, enabling additional functionality. Corresponds to the JSON property addonsConfig



238
239
240
# File 'generated/google/apis/container_v1/classes.rb', line 238

def addons_config
  @addons_config
end

#cluster_ipv4_cidrString

The IP address range of the container pods in this cluster, in CIDR notation (e.g. 10.96.0.0/14). Leave blank to have one automatically chosen or specify a /14 block in 10.0.0.0/8. Corresponds to the JSON property clusterIpv4Cidr

Returns:

  • (String)


246
247
248
# File 'generated/google/apis/container_v1/classes.rb', line 246

def cluster_ipv4_cidr
  @cluster_ipv4_cidr
end

#conditionsArray<Google::Apis::ContainerV1::StatusCondition>

Which conditions caused the current cluster state. Corresponds to the JSON property conditions



251
252
253
# File 'generated/google/apis/container_v1/classes.rb', line 251

def conditions
  @conditions
end

#create_timeString

[Output only] The time the cluster was created, in RFC3339 text format. Corresponds to the JSON property createTime

Returns:

  • (String)


257
258
259
# File 'generated/google/apis/container_v1/classes.rb', line 257

def create_time
  @create_time
end

#current_master_versionString

[Output only] The current software version of the master endpoint. Corresponds to the JSON property currentMasterVersion

Returns:

  • (String)


262
263
264
# File 'generated/google/apis/container_v1/classes.rb', line 262

def current_master_version
  @current_master_version
end

#current_node_countFixnum

[Output only] The number of nodes currently in the cluster. Deprecated. Call Kubernetes API directly to retrieve node information. Corresponds to the JSON property currentNodeCount

Returns:

  • (Fixnum)


268
269
270
# File 'generated/google/apis/container_v1/classes.rb', line 268

def current_node_count
  @current_node_count
end

#current_node_versionString

[Output only] Deprecated, use NodePools.version instead. The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes. Corresponds to the JSON property currentNodeVersion

Returns:

  • (String)


278
279
280
# File 'generated/google/apis/container_v1/classes.rb', line 278

def current_node_version
  @current_node_version
end

#default_max_pods_constraintGoogle::Apis::ContainerV1::MaxPodsConstraint

Constraints applied to pods. Corresponds to the JSON property defaultMaxPodsConstraint



283
284
285
# File 'generated/google/apis/container_v1/classes.rb', line 283

def default_max_pods_constraint
  @default_max_pods_constraint
end

#descriptionString

An optional description of this cluster. Corresponds to the JSON property description

Returns:

  • (String)


288
289
290
# File 'generated/google/apis/container_v1/classes.rb', line 288

def description
  @description
end

#enable_kubernetes_alphaBoolean Also known as: enable_kubernetes_alpha?

Kubernetes alpha features are enabled on this cluster. This includes alpha API groups (e.g. v1alpha1) and features that may not be production ready in the kubernetes version of the master and nodes. The cluster has no SLA for uptime and master/node upgrades are disabled. Alpha enabled clusters are automatically deleted thirty days after creation. Corresponds to the JSON property enableKubernetesAlpha

Returns:

  • (Boolean)


298
299
300
# File 'generated/google/apis/container_v1/classes.rb', line 298

def enable_kubernetes_alpha
  @enable_kubernetes_alpha
end

#enable_tpuBoolean Also known as: enable_tpu?

Enable the ability to use Cloud TPUs in this cluster. Corresponds to the JSON property enableTpu

Returns:

  • (Boolean)


304
305
306
# File 'generated/google/apis/container_v1/classes.rb', line 304

def enable_tpu
  @enable_tpu
end

#endpointString

[Output only] The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at https://username:password@endpoint/. See the masterAuth property of this resource for username and password information. Corresponds to the JSON property endpoint

Returns:

  • (String)


314
315
316
# File 'generated/google/apis/container_v1/classes.rb', line 314

def endpoint
  @endpoint
end

#expire_timeString

[Output only] The time the cluster will be automatically deleted in RFC3339 text format. Corresponds to the JSON property expireTime

Returns:

  • (String)


320
321
322
# File 'generated/google/apis/container_v1/classes.rb', line 320

def expire_time
  @expire_time
end

#initial_cluster_versionString

The initial Kubernetes version for this cluster. Valid versions are those found in validMasterVersions returned by getServerConfig. The version can be upgraded over time; such upgrades are reflected in currentMasterVersion and currentNodeVersion. Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior:

  • "latest": picks the highest valid Kubernetes version
  • "1.X": picks the highest valid patch+gke.N patch in the 1.X version
  • "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
  • "1.X.Y-gke.N": picks an explicit Kubernetes version
  • "","-": picks the default Kubernetes version Corresponds to the JSON property initialClusterVersion

Returns:

  • (String)


335
336
337
# File 'generated/google/apis/container_v1/classes.rb', line 335

def initial_cluster_version
  @initial_cluster_version
end

#initial_node_countFixnum

The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. For requests, this field should only be used in lieu of a "node_pool" object, since this configuration (along with the "node_config") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a node_pool at the same time. This field is deprecated, use node_pool.initial_node_count instead. Corresponds to the JSON property initialNodeCount

Returns:

  • (Fixnum)


348
349
350
# File 'generated/google/apis/container_v1/classes.rb', line 348

def initial_node_count
  @initial_node_count
end

#instance_group_urlsArray<String>

Deprecated. Use node_pools.instance_group_urls. Corresponds to the JSON property instanceGroupUrls

Returns:

  • (Array<String>)


353
354
355
# File 'generated/google/apis/container_v1/classes.rb', line 353

def instance_group_urls
  @instance_group_urls
end

#ip_allocation_policyGoogle::Apis::ContainerV1::IpAllocationPolicy

Configuration for controlling how IPs are allocated in the cluster. Corresponds to the JSON property ipAllocationPolicy



358
359
360
# File 'generated/google/apis/container_v1/classes.rb', line 358

def ip_allocation_policy
  @ip_allocation_policy
end

#label_fingerprintString

The fingerprint of the set of labels for this cluster. Corresponds to the JSON property labelFingerprint

Returns:

  • (String)


363
364
365
# File 'generated/google/apis/container_v1/classes.rb', line 363

def label_fingerprint
  @label_fingerprint
end

#legacy_abacGoogle::Apis::ContainerV1::LegacyAbac

Configuration for the legacy Attribute Based Access Control authorization mode. Corresponds to the JSON property legacyAbac



369
370
371
# File 'generated/google/apis/container_v1/classes.rb', line 369

def legacy_abac
  @legacy_abac
end

#locationString

[Output only] The name of the Google Compute Engine zone or region in which the cluster resides. Corresponds to the JSON property location

Returns:

  • (String)


377
378
379
# File 'generated/google/apis/container_v1/classes.rb', line 377

def location
  @location
end

#locationsArray<String>

The list of Google Compute Engine zones in which the cluster's nodes should be located. Corresponds to the JSON property locations

Returns:

  • (Array<String>)


384
385
386
# File 'generated/google/apis/container_v1/classes.rb', line 384

def locations
  @locations
end

#logging_serviceString

The logging service the cluster should use to write logs. Currently available options:

  • "logging.googleapis.com/kubernetes" - the Google Cloud Logging service with Kubernetes-native resource model in Stackdriver
  • logging.googleapis.com - the Google Cloud Logging service.
  • none - no logs will be exported from the cluster.
  • if left as an empty string,logging.googleapis.com will be used. Corresponds to the JSON property loggingService

Returns:

  • (String)


395
396
397
# File 'generated/google/apis/container_v1/classes.rb', line 395

def logging_service
  @logging_service
end

#maintenance_policyGoogle::Apis::ContainerV1::MaintenancePolicy

MaintenancePolicy defines the maintenance policy to be used for the cluster. Corresponds to the JSON property maintenancePolicy



400
401
402
# File 'generated/google/apis/container_v1/classes.rb', line 400

def maintenance_policy
  @maintenance_policy
end

#master_authGoogle::Apis::ContainerV1::MasterAuth

The authentication information for accessing the master endpoint. Authentication can be done using HTTP basic auth or using client certificates. Corresponds to the JSON property masterAuth



407
408
409
# File 'generated/google/apis/container_v1/classes.rb', line 407

def master_auth
  @master_auth
end

#master_authorized_networks_configGoogle::Apis::ContainerV1::MasterAuthorizedNetworksConfig

Configuration options for the master authorized networks feature. Enabled master authorized networks will disallow all external traffic to access Kubernetes master through HTTPS except traffic from the given CIDR blocks, Google Compute Engine Public IPs and Google Prod IPs. Corresponds to the JSON property masterAuthorizedNetworksConfig



415
416
417
# File 'generated/google/apis/container_v1/classes.rb', line 415

def master_authorized_networks_config
  @master_authorized_networks_config
end

#monitoring_serviceString

The monitoring service the cluster should use to write metrics. Currently available options:

  • monitoring.googleapis.com - the Google Cloud Monitoring service.
  • none - no metrics will be exported from the cluster.
  • if left as an empty string, monitoring.googleapis.com will be used. Corresponds to the JSON property monitoringService

Returns:

  • (String)


424
425
426
# File 'generated/google/apis/container_v1/classes.rb', line 424

def monitoring_service
  @monitoring_service
end

#nameString

The name of this cluster. The name must be unique within this project and zone, and can be up to 40 characters with the following restrictions:

  • Lowercase letters, numbers, and hyphens only.
  • Must start with a letter.
  • Must end with a number or a letter. Corresponds to the JSON property name

Returns:

  • (String)


433
434
435
# File 'generated/google/apis/container_v1/classes.rb', line 433

def name
  @name
end

#networkString

The name of the Google Compute Engine network to which the cluster is connected. If left unspecified, the default network will be used. Corresponds to the JSON property network

Returns:

  • (String)


441
442
443
# File 'generated/google/apis/container_v1/classes.rb', line 441

def network
  @network
end

#network_configGoogle::Apis::ContainerV1::NetworkConfig

NetworkConfig reports the relative names of network & subnetwork. Corresponds to the JSON property networkConfig



446
447
448
# File 'generated/google/apis/container_v1/classes.rb', line 446

def network_config
  @network_config
end

#network_policyGoogle::Apis::ContainerV1::NetworkPolicy

Configuration options for the NetworkPolicy feature. https://kubernetes.io/docs/concepts/services-networking/networkpolicies/ Corresponds to the JSON property networkPolicy



452
453
454
# File 'generated/google/apis/container_v1/classes.rb', line 452

def network_policy
  @network_policy
end

#node_configGoogle::Apis::ContainerV1::NodeConfig

Parameters that describe the nodes in a cluster. Corresponds to the JSON property nodeConfig



457
458
459
# File 'generated/google/apis/container_v1/classes.rb', line 457

def node_config
  @node_config
end

#node_ipv4_cidr_sizeFixnum

[Output only] The size of the address space on each node for hosting containers. This is provisioned from within the container_ipv4_cidr range. This field will only be set when cluster is in route-based network mode. Corresponds to the JSON property nodeIpv4CidrSize

Returns:

  • (Fixnum)


465
466
467
# File 'generated/google/apis/container_v1/classes.rb', line 465

def node_ipv4_cidr_size
  @node_ipv4_cidr_size
end

#node_poolsArray<Google::Apis::ContainerV1::NodePool>

The node pools associated with this cluster. This field should not be set if "node_config" or "initial_node_count" are specified. Corresponds to the JSON property nodePools



472
473
474
# File 'generated/google/apis/container_v1/classes.rb', line 472

def node_pools
  @node_pools
end

#private_cluster_configGoogle::Apis::ContainerV1::PrivateClusterConfig

Configuration options for private clusters. Corresponds to the JSON property privateClusterConfig



477
478
479
# File 'generated/google/apis/container_v1/classes.rb', line 477

def private_cluster_config
  @private_cluster_config
end

#resource_labelsHash<String,String>

The resource labels for the cluster to use to annotate any related Google Compute Engine resources. Corresponds to the JSON property resourceLabels

Returns:

  • (Hash<String,String>)


483
484
485
# File 'generated/google/apis/container_v1/classes.rb', line 483

def resource_labels
  @resource_labels
end

#resource_usage_export_configGoogle::Apis::ContainerV1::ResourceUsageExportConfig

Configuration for exporting cluster resource usages. Corresponds to the JSON property resourceUsageExportConfig



488
489
490
# File 'generated/google/apis/container_v1/classes.rb', line 488

def resource_usage_export_config
  @resource_usage_export_config
end

[Output only] Server-defined URL for the resource. Corresponds to the JSON property selfLink

Returns:

  • (String)


493
494
495
# File 'generated/google/apis/container_v1/classes.rb', line 493

def self_link
  @self_link
end

#services_ipv4_cidrString

[Output only] The IP address range of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are typically put in the last /16 from the container CIDR. Corresponds to the JSON property servicesIpv4Cidr

Returns:

  • (String)


502
503
504
# File 'generated/google/apis/container_v1/classes.rb', line 502

def services_ipv4_cidr
  @services_ipv4_cidr
end

#statusString

[Output only] The current status of this cluster. Corresponds to the JSON property status

Returns:

  • (String)


507
508
509
# File 'generated/google/apis/container_v1/classes.rb', line 507

def status
  @status
end

#status_messageString

[Output only] Additional information about the current status of this cluster, if available. Corresponds to the JSON property statusMessage

Returns:

  • (String)


513
514
515
# File 'generated/google/apis/container_v1/classes.rb', line 513

def status_message
  @status_message
end

#subnetworkString

The name of the Google Compute Engine subnetwork to which the cluster is connected. Corresponds to the JSON property subnetwork

Returns:

  • (String)


520
521
522
# File 'generated/google/apis/container_v1/classes.rb', line 520

def subnetwork
  @subnetwork
end

#tpu_ipv4_cidr_blockString

[Output only] The IP address range of the Cloud TPUs in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Corresponds to the JSON property tpuIpv4CidrBlock

Returns:

  • (String)


527
528
529
# File 'generated/google/apis/container_v1/classes.rb', line 527

def tpu_ipv4_cidr_block
  @tpu_ipv4_cidr_block
end

#zoneString

[Output only] The name of the Google Compute Engine zone in which the cluster resides. This field is deprecated, use location instead. Corresponds to the JSON property zone

Returns:

  • (String)


535
536
537
# File 'generated/google/apis/container_v1/classes.rb', line 535

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
# File 'generated/google/apis/container_v1/classes.rb', line 542

def update!(**args)
  @addons_config = args[:addons_config] if args.key?(:addons_config)
  @cluster_ipv4_cidr = args[:cluster_ipv4_cidr] if args.key?(:cluster_ipv4_cidr)
  @conditions = args[:conditions] if args.key?(:conditions)
  @create_time = args[:create_time] if args.key?(:create_time)
  @current_master_version = args[:current_master_version] if args.key?(:current_master_version)
  @current_node_count = args[:current_node_count] if args.key?(:current_node_count)
  @current_node_version = args[:current_node_version] if args.key?(:current_node_version)
  @default_max_pods_constraint = args[:default_max_pods_constraint] if args.key?(:default_max_pods_constraint)
  @description = args[:description] if args.key?(:description)
  @enable_kubernetes_alpha = args[:enable_kubernetes_alpha] if args.key?(:enable_kubernetes_alpha)
  @enable_tpu = args[:enable_tpu] if args.key?(:enable_tpu)
  @endpoint = args[:endpoint] if args.key?(:endpoint)
  @expire_time = args[:expire_time] if args.key?(:expire_time)
  @initial_cluster_version = args[:initial_cluster_version] if args.key?(:initial_cluster_version)
  @initial_node_count = args[:initial_node_count] if args.key?(:initial_node_count)
  @instance_group_urls = args[:instance_group_urls] if args.key?(:instance_group_urls)
  @ip_allocation_policy = args[:ip_allocation_policy] if args.key?(:ip_allocation_policy)
  @label_fingerprint = args[:label_fingerprint] if args.key?(:label_fingerprint)
  @legacy_abac = args[:legacy_abac] if args.key?(:legacy_abac)
  @location = args[:location] if args.key?(:location)
  @locations = args[:locations] if args.key?(:locations)
  @logging_service = args[:logging_service] if args.key?(:logging_service)
  @maintenance_policy = args[:maintenance_policy] if args.key?(:maintenance_policy)
  @master_auth = args[:master_auth] if args.key?(:master_auth)
  @master_authorized_networks_config = args[:master_authorized_networks_config] if args.key?(:master_authorized_networks_config)
  @monitoring_service = args[:monitoring_service] if args.key?(:monitoring_service)
  @name = args[:name] if args.key?(:name)
  @network = args[:network] if args.key?(:network)
  @network_config = args[:network_config] if args.key?(:network_config)
  @network_policy = args[:network_policy] if args.key?(:network_policy)
  @node_config = args[:node_config] if args.key?(:node_config)
  @node_ipv4_cidr_size = args[:node_ipv4_cidr_size] if args.key?(:node_ipv4_cidr_size)
  @node_pools = args[:node_pools] if args.key?(:node_pools)
  @private_cluster_config = args[:private_cluster_config] if args.key?(:private_cluster_config)
  @resource_labels = args[:resource_labels] if args.key?(:resource_labels)
  @resource_usage_export_config = args[:resource_usage_export_config] if args.key?(:resource_usage_export_config)
  @self_link = args[:self_link] if args.key?(:self_link)
  @services_ipv4_cidr = args[:services_ipv4_cidr] if args.key?(:services_ipv4_cidr)
  @status = args[:status] if args.key?(:status)
  @status_message = args[:status_message] if args.key?(:status_message)
  @subnetwork = args[:subnetwork] if args.key?(:subnetwork)
  @tpu_ipv4_cidr_block = args[:tpu_ipv4_cidr_block] if args.key?(:tpu_ipv4_cidr_block)
  @zone = args[:zone] if args.key?(:zone)
end