# Cluster

## GET /v4/{projectId}/clusters

> Get the list of clusters currently setup in PMK

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/clusters":{"get":{"tags":["Cluster"],"summary":"Get the list of clusters currently setup in PMK","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cluster belongs to"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/cluster_details"}}}}},"403":{"description":"unauthorized to perform this operation"}}}}},"components":{"schemas":{"cluster_details":{"type":"object","properties":{"name":{"type":"string","description":"Name of the cluster"},"uuid":{"type":"string","description":"UUID of the cluster"},"created_at":{"type":"string","description":"Creation time of the cluster"},"projectId":{"type":"string","description":"UUID of the Keystone project that this cluster is part of"},"isKubernetes":{"type":"integer","description":"Field is set to 1 if the cluster is a Kubernetes cluster, 0 otherwise"},"kubeRoleVersion":{"type":"string","description":"The version of the pf9-kube role"},"etcdVersion":{"type":"string","description":"The version of etcd used for cluster"},"isAirgapped":{"type":"integer","description":"Field is set to 1 if the cluster is air-gapped, 0 otherwise"},"useHostname":{"type":"boolean","description":"(optioanl) If set to true nodes will be registered in the cluster using hostname instead of IP address. This option is only applicable to IPv4 hosts. This option is ignored when deploying clusters on IPv6 enabled hosts and public clouds - AWS, Azure, etc."},"allowWorkloadsOnMaster":{"type":"integer","description":"Field is set to 1 if the master nodes can run non-critical workloads"},"containerRuntime":{"type":"string","description":"(optional) Container runtime for this cluster. Valid values: [docker, containerd]"},"containersCidr":{"type":"string","description":"CIDR used for container IP addresses"},"servicesCidr":{"type":"string","description":"CIDR used for service IP addresses"},"externalDnsName":{"type":"string","description":"Optional DNS name for API endpoint. This field is autogenerated when pf9 domain is used."},"privileged":{"type":"integer","description":"Field is set to 1 if cluster runs privileged containers, 0 otherwise"},"runtimeConfig":{"type":"string","description":""},"kubeProxyMode":{"type":"string","description":"The mode of kube proxy"},"apiserverStorageBackend":{"type":"string","description":"The storage backend of the api server"},"k8sApiPort":{"type":"string","description":"Port on which K8S API Server will listen, 443 by default"},"masterIp":{"type":"string","description":"Ip of the master node, applicable only for cloud provider type 'openstack'"},"masterVipIpv4":{"type":"string","description":"API server Virtual IP that provides failover if specified for the cluster. Defaults to empty string"},"masterVipIface":{"type":"string","description":"The interface that VIP attaches to if specified. Defaults to empty string"},"masterVipVrouterId":{"type":"string","description":"Virtual router id choosen for the cluster. Range: 0-254. Emptry string if masterVipIpv4 not specified"},"networkPlugin":{"type":"string","description":"Network backend to use for container networking. Defaults to flannel. Supported choices are flannel, calico, noop, weave"},"addonOperatorImageTag":{"type":"string","description":"(optional) addon operator image tag for this cluster."},"dockerRoot":{"type":"string","description":"Root directory for docker"},"etcdDataDir":{"type":"string","description":"Data directory for etcd. The field is applicable to master nodes only"},"certExpiryHrs":{"type":"integer","description":"(optional) Number of hours before user certificates in kubeconfig expires, should be greater than 0 if set. Default is 24hrs."},"keystoneEnabled":{"type":"integer","description":"Field is set to 1 if keystone is enabled, 0 otherwise"},"authzEnabled":{"type":"integer","description":"Field is set to 1 if authz is enabled, 0 otherwise"},"appCatalogEnabled":{"type":"integer","description":"DEPRECATED. Field doesn't lead to any action on the cluster now. Field is set to 1 if app catalog is enabled, 0 otherwise"},"enableProfileAgent":{"type":"boolean","description":"(optional) If set to true platform9 profile engine agent will be deployed on the cluster. This agent is required to be able to use profiles."},"enableEtcdEncryption":{"type":"string","description":"States whether tls encryption is enabled on etcd, Default:false"},"etcdBackup":{"$ref":"#/components/schemas/etcd_backup_for_get"},"ipv6":{"type":"boolean","description":"Set to 1 if ipv6 enabled. Defaults to 0"},"enableMetallb":{"type":"boolean","description":"1 if metallb enabled. Defaults to 0"},"metallbCidr":{"type":"string","description":"Comma separated pools of IPs like A.B.C.D-E.F.G.H, I.J.K.L-M.N.O.P that metallb will manage if specified"},"base64EncMetallbConfig":{"type":"string","description":"Base64 encoded string of metallb custom resource yaml"},"nodePoolUuid":{"type":"string","description":"UUID of the node pool used for the cluster"},"nodePoolName":{"type":"string","description":"Name of the node pool used for the cluster"},"cloudProviderUuid":{"type":"string","description":"UUID of the cloud provider used to create this cluster"},"cloudProviderName":{"type":"string","description":"Name of the cloud provider used to create this cluster"},"cloudProviderType":{"type":"string","description":"Type of the cloud provider used to create this cluster"},"cloudProperties":{"$ref":"#/components/schemas/cloud_properties"},"tags":{"type":"object","description":"User defined key-value pairs represented as a JSON object"},"mtuSize":{"type":"string","description":"MTU for container network interfaces. Optional and used for the Calico network backend"},"cpuManagerPolicy":{"type":"string","description":"options: none, static; default: none"},"topologyManagerPolicy":{"type":"string","description":"options: none, best-effort, restricted, single-numa-node; default: none"},"reservedCPUs":{"type":"string","description":"list of CPUs to be reserved for the system. Ex: 1-3,5"},"numMasters":{"type":"integer","description":"Number of master nodes in the cluster"},"numWorkers":{"type":"integer","description":"Number of worker nodes in the cluster"},"status":{"type":"string","description":"Status of the cluster"},"masterStatus":{"type":"string","description":"Status of the master nodes. 'healthy' means all masters are healthy. 'partially healthy' means quorum number of masters are healthy, but some are not. 'unhealthy' means quorum number of master are unhealthy"},"workerStatus":{"type":"string","description":"Status of the worker nodes. 'healthy' means all workers are healthy. 'partially healthy' means more than 50% of the workers are healthy, rest are unhealthy. 'unhealthy' means more than 50% of the workers are unhealthy"},"lastOp":{"type":"string","description":"The last operation such as node attach or node detach that was performed on the cluster"},"lastOk":{"type":"string","description":"The timestamp when the cluster last reported an OK status"},"taskStatus":{"type":"string","description":"Status of the last task that run on the cluster."},"taskError":{"type":"string","description":"Error details if the last task on cluster did not succeed"},"debug":{"type":"string","description":"enable debug"},"masterless":{"type":"integer","description":"1 if masterless cluster, 0 otherwise"},"upgradingTo":{"type":"string","description":"The version that the cluster is upgrading to"},"canUpgrade":{"type":"boolean","description":"Field is set to true if the cluster can be upgraded, false otherwise"},"canMinorUpgrade":{"type":"integer","description":"Field is set to 1 if the cluster can be upgraded to a minor version, 0 otherwise"},"canPatchUpgrade":{"type":"integer","description":"Field is set to 1 if the cluster can be upgraded to a patch version, 0 otherwise"},"minorUpgradeRoleVersion":{"type":"string","description":"The minor version of the pf9-kube role that can be upgraded"},"patchUpgradeRoleVersion":{"type":"string","description":"The patch version of the pf9-kube role that can be upgraded"},"flannelIfaceLabel":{"type":"string","description":"The interface used by flannel for interhost communication"},"flannelPublicIfaceLabel":{"type":"string","description":"The IP address used as the flannel public IP for the nodes in the cluster"},"calicoIPv4":{"type":"string","description":"Calico IPv4 mode"},"calicoIPv4DetectionMethod":{"type":"string","description":"Calico IPv4 detection method"},"calicoV4BlockSize":{"type":"string","description":"Subnet size per node for the Calico network, in CIDR notation (e.g. 26)"},"calicoIPv6":{"type":"string","description":"Calico IPv6 mode"},"calicoIPv6DetectionMethod":{"type":"string","description":"Calico IPv6 detection method"},"calicoIPv6PoolCidr":{"type":"string","description":"Calico IPv6 pool CIDR"},"calicoIPv6PoolBlockSize":{"type":"string","description":"Calico IPv6 pool block size"},"calicoIPv6PoolNatOutgoing":{"type":"integer","description":"Calico IPv6 pool NAT outgoing"},"calicoRouterID":{"type":"string","description":"Calico router ID"},"calicoIpIpMode":{"type":"string","description":"IP-IP encapsulation mode for Calico network. Choose: Always, Never, CrossSubnet"},"calicoNatOutgoing":{"type":"boolean","description":"Field is set to true if Calico nodes need to NAT north-south egress traffic."},"calicoNodeCpuLimit":{"type":"string","description":"Corresponds to the CALICO_NODE_CPU_LIMIT environment variable in Calico."},"calicoNodeMemoryLimit":{"type":"string","description":"Corresponds to the CALICO_NODE_MEMORY_LIMIT environment variable in Calico."},"calicoTyphaCpuLimit":{"type":"string","description":"Corresponds to the CALICO_TYPHA_CPU_LIMIT environment variable in Calico."},"calicoTyphaMemoryLimit":{"type":"string","description":"Corresponds to the CALICO_TYPHA_MEMORY_LIMIT environment variable in Calico."},"calicoControllerCpuLimit":{"type":"string","description":"Corresponds to the CALICO_CONTROLLER_CPU_LIMIT environment variable in Calico."},"calicoControllerMemoryLimit":{"type":"string","description":"Corresponds to the CALICO_CONTROLLER_MEMORY_LIMIT environment variable in Calico."},"felixIPv6Support":{"type":"integer","description":"Field is set to true if Felix supports IPv6"},"dockerCentosPackageRepoUrl":{"type":"string","description":"(optional) URL of the centos repo to be used for docker installation"},"dockerUbuntuPackageRepoUrl":{"type":"string","description":"(optional) URL of the ubuntu repo to be used for docker installation"},"dockerPrivateRegistry":{"type":"string","description":"(optional) URL of private Docker registry to fetch Platform9 images from"},"quayPrivateRegistry":{"type":"string","description":"(optional) URL of private Quay registry to fetch Platform9 images from"},"gcrPrivateRegistry":{"type":"string","description":"(optional) URL of private GCR registry to fetch Platform9 images from"},"k8sPrivateRegistry":{"type":"string","description":"(optional) URL of private K8S registry to fetch Platform9 images from"},"customRegistryUrl":{"type":"string","description":"URL for a custom registry that is expected to serve all images for the cluster"},"customRegistryRepoPath":{"type":"string","description":"path in custom registry where all images are cached"},"customRegistryUsername":{"type":"string","description":"username for the custom registry"},"customRegistryPassword":{"type":"string","description":"password for the custom registry"},"customRegistrySkipTls":{"type":"boolean","description":"configure containerd to skip tls verification for custom registry"},"customRegistrySelfSignedCerts":{"type":"boolean","description":"Set to true if the custom registry uses self signed certs"},"customRegistryCertPath":{"type":"string","description":"Path to the cert file for the custom registry if using self signed certs. Can be of the following formats: [https://example.com/path/to/cert, http://example.com/path/to/cert, file:///path/to/cert, /path/to/cert]"}}},"etcd_backup_for_get":{"type":"object","properties":{"isEtcdBackupEnabled":{"type":"boolean","description":"Set to true if etcd backup should be enabled, false otherwise"},"intervalInMins":{"type":"integer","description":"etcd backup interval, specified in minutes"},"intervalInHours":{"type":"integer","description":"etcd backup interval, specified in Hours"},"dailyBackupTime":{"type":"string","description":"etcd backup Timestamp for daily backup, specified in format 'HH:MM' "},"maxIntervalBackupCount":{"type":"integer","description":"max number of Backups retention for interval type backups"},"maxTimestampBackupCount":{"type":"integer","description":"max number of Backups retention for Timestamp type backups"},"storageType":{"type":"string","description":"Storage type for the etcd backup. Only 'local' is current supported type. 'local' saves backup to the node's local disk"},"storageProperties":{"$ref":"#/components/schemas/etcdbackup_storageproperties"},"taskStatus":{"type":"string","description":"Status indicating whether the backup cron job on the Kubernetes cluster was successfully setup. Can be 'success' or 'error'"},"taskErrorDetail":{"type":"string","description":"Details of the error occurred of the taskStatus returned is 'error'"}}},"etcdbackup_storageproperties":{"type":"object","properties":{"localPath":{"type":"string","description":"Path on the local filesystem where the etcd backup should be stored. For 'local' storage type only."}}},"cloud_properties":{"type":"object","properties":{"region":{"type":"string","description":"Cloud provider region in which the cluster was created"},"masterFlavor":{"type":"string","description":"Node flavor used for master node"},"workerFlavor":{"type":"string","description":"Node flavor used for worker node"},"sshKey":{"type":"string","description":"Public SSH key associated with the cluster nodes"},"serviceFqdn":{"type":"string","description":"FQDN used to reference cluster services"},"ami":{"type":"string","description":"AMI ID used to provision cluster nodes"},"domainId":{"type":"string","description":"Domain used for cluster FQDNs"},"isPrivate":{"type":"boolean","description":"Set to true if nodes are deployed using public subnet, false otherwise, applicable also for manual deploy. This parameter is required if internalElb is set to true."},"usePf9Domain":{"type":"string","description":"Set to true if platform9.net domain is used, false otherwise"},"internalElb":{"type":"boolean","description":"Set to true if load balancer is an internal load balancer or false for an Internet-facing load balancer. More information here: https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-internal-load-balancers.html Setting this parameter to true requires that isPrivate is set to true. If the private subnet selected is not configured to route IP packets through a VPN, then an httpProxy is required for node communications to work"},"azs":{"type":"array","items":{"type":"string"},"description":"Availability zone(s) the cluster is deployed in"},"httpProxy":{"type":"string","description":"The http proxy used for node communications. This parameter is required when internalElb is set to true and the private subnet selected does not route IP packets to the internet through a VPN"},"privateSubnets":{"type":"array","items":{"type":"string"},"description":"The private subnet ID to which the cluster is deployed. This parameter is optional if vpc (VPC ID) is set. This parameter is required if vpc (VPC ID) is set and isPrivate is set to true. This parameter is ignored if vpc (VPC ID) is not set"},"subnets":{"type":"array","items":{"type":"string","description":"The public subnet ID to which the cluster is deployed. This parameter is required if vpc (VPC ID) is set and isPrivate is set to false (Public topology). This parameter is required if vpc (VPC ID) is set and isPrivate is set to true (Private topology). This parameter is optional if vpc (VPC ID) is set and isPrivate is set to true and internalElb is set to true (VPN topology). This parameter is ignored if vpc (VPC ID) is not set"}},"vpc":{"type":"string","description":"If set, creates cluster using this VPC ID. Otherwise, the cluster is deployed on a new VPC. This parameter is required if internalElb is set to true"},"customAmi":{"type":"string","description":"The custom ami name which can be specified by a user"}}}}}}
```

## POST /v4/{projectId}/clusters

> Creates a cluster using auto deploy or manual mode

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/clusters":{"post":{"tags":["Cluster"],"summary":"Creates a cluster using auto deploy or manual mode","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cluster belongs to"}],"responses":{"200":{"description":"OK, if cluster create request was submitted successfully"},"403":{"description":"Unauthorized to perform this operation"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/cluster_details_for_post"}}},"required":true}}}},"components":{"schemas":{"cluster_details_for_post":{"type":"object","required":["containersCidr","networkPlugin","servicesCidr","kubeRoleVersion"],"properties":{"allowWorkloadsOnMaster":{"type":"integer","description":"Field is set to 1 if the master nodes can run non-critical workloads"},"apiServerFlags":{"type":"array","items":{"type":"string"},"description":"List of kube-apiserver flags. (e.g. --request-timeout=2m0s, --kubelet-timeout=20s)"},"ami":{"type":"string","description":"AMI ID used to provision cluster nodes"},"appCatalogEnabled":{"type":"integer","description":"DEPRECATED. Always disabled now. Field is set to 1 if app catalog is enabled, 0 otherwise, applicable also for manual deploy"},"azs":{"type":"array","items":{"type":"string"},"description":"Availability zone(s) the cluster is deployed in"},"calicoV4BlockSize":{"type":"string","description":"Subnet size per node for the Calico network, in CIDR notation (e.g. 26)"},"calicoIpIpMode":{"type":"string","description":"IP-IP encapsulation mode for Calico network. Choose: Always, Never, CrossSubnet"},"calicoNatOutgoing":{"type":"boolean","description":"Field is set to true if Calico nodes need to NAT north-south egress traffic."},"calicoNodeCpuLimit":{"type":"string","description":"Corresponds to the CALICO_NODE_CPU_LIMIT environment variable in Calico."},"calicoNodeMemoryLimit":{"type":"string","description":"Corresponds to the CALICO_NODE_MEMORY_LIMIT environment variable in Calico."},"calicoTyphaCpuLimit":{"type":"string","description":"Corresponds to the CALICO_TYPHA_CPU_LIMIT environment variable in Calico."},"calicoTyphaMemoryLimit":{"type":"string","description":"Corresponds to the CALICO_TYPHA_MEMORY_LIMIT environment variable in Calico."},"calicoControllerCpuLimit":{"type":"string","description":"Corresponds to the CALICO_CONTROLLER_CPU_LIMIT environment variable in Calico."},"calicoControllerMemoryLimit":{"type":"string","description":"Corresponds to the CALICO_CONTROLLER_MEMORY_LIMIT environment variable in Calico."},"containersCidr":{"type":"string","description":"CIDR used for container IP addresses, applicable also for manual deploy"},"controllerManagerFlags":{"type":"array","items":{"type":"string"},"description":"List of kube-controller-manager flags. (e.g. --large-cluster-size-threshold=60, --node-monitor-period =5s)"},"dockerLiveRestoreEnabled":{"type":"boolean","description":"Enables the use of Docker live restore as described here: https://docs.docker.com/config/containers/live-restore/"},"domainId":{"type":"string","description":"Domain used for cluster FQDNs"},"enableMetallb":{"type":"boolean","description":"If true, install MetalLB to support the loadbalancer service-type"},"enableCAS":{"type":"boolean","description":"If true, cluster autoscaling is enabled (only for AWS clusters)."},"etcdBackup":{"$ref":"#/components/schemas/etcd_backup","description":"Etcd backup configuration"},"externalDnsName":{"type":"string","description":"Optional DNS name for API endpoint. This field is autogenerated when usePf9Domain is set, also applicable for manual deploy"},"httpProxy":{"type":"string","description":"The http proxy used for node communications. This parameter is required when internalElb is set to true and the private subnet selected does not route IP packets to the internet through a VPN"},"internalElb":{"type":"boolean","description":"Set to true if load balancer is an internal load balancer or false for an Internet-facing load balancer. More information here: https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-internal-load-balancers.html. Setting this parameter to true requires that isPrivate is set to true. If the private subnet selected is not configured to route IP packets through a VPN, then an httpProxy is required for node communications to work"},"isPrivate":{"type":"boolean","description":"Set to true if nodes are deployed using public subnet, false otherwise, applicable also for manual deploy. This parameter is required if internalElb is set to true."},"k8sApiPort":{"type":"string","description":"Port on which K8S API Server will listen, 443 by default"},"masterFlavor":{"type":"string","description":"Node flavor used for master node"},"masterVipIpv4":{"type":"string","description":"API server Virtual IP that provides failover. When specified, deploy keepalived setup to cluster master nodes together"},"masterVipIface":{"type":"string","description":"If masterVipIpv4 is specified, this field is required. Specify the interface that the VIP attaches to"},"metallbCidr":{"type":"string","description":"If enableMetallb is true, specify the comma-separated pools of IPs that MetalLB will manage (for example: A.B.C.D-E.F.G.H, I.J.K.L-M.N.O.P)"},"base64EncMetallbConfig":{"type":"string","description":"Base64 encoded string of metallb custom resource yaml"},"mtuSize":{"type":"string","description":"MTU for container network interfaces. Optional and used for the Calico network backend"},"name":{"type":"string","description":"Name of the cluster, applicable also for manual deploy"},"networkPlugin":{"type":"string","description":"Network backend to use for container networking. Defaults to flannel. Supported choices are flannel, calico, noop, weave"},"nodePoolUuid":{"type":"string","description":"UUID of the node pool used for the cluster, applicable also for manual deploy"},"numMasters":{"type":"integer","description":"Number of master nodes in the cluster"},"numWorkers":{"type":"integer","description":"Number of worker nodes in the cluster"},"numMinWorkers":{"type":"integer","description":"This parameter is required if enableCAS is set to true. This is the minimum number of worker nodes in ASG"},"numMaxWorkers":{"type":"integer","description":"This parameter is required if enableCAS is set to true. This is the maximum number of worker nodes in ASG"},"ebsVolumeThroughput":{"type":"integer","description":"(optional) throughput for default gp3 root volume"},"ebsVolumeIops":{"type":"integer","description":"(optional) iops for default gp3 root volume"},"additionalAWSDiskSize":{"type":"integer","description":"Size for block device added for EMP clusters"},"privateSubnets":{"type":"array","items":{"type":"string"},"description":"The private subnet ID to which the cluster is deployed. This parameter is optional if vpc (VPC ID) is set. This parameter is required if vpc (VPC ID) is set and isPrivate is set to true. This parameter is ignored if vpc (VPC ID) is not set"},"privileged":{"type":"boolean","description":"Field is set to 1 if cluster runs privileged containers, 0 otherwise"},"region":{"type":"string","description":"Cloud provider region in which the cluster was created"},"runtimeConfig":{"type":"string","description":"Applicable also for manual deploy"},"schedulerFlags":{"type":"array","items":{"type":"string"},"description":"List of kube-scheduler flags. (e.g. --kube-api-burst=120, --log-flush-frequency=5s)"},"serviceFqdn":{"type":"string","description":"FQDN used to reference cluster services"},"servicesCidr":{"type":"string","description":"CIDR used for service IP addresses, applicable also for manual deploy"},"sshKey":{"type":"string","description":"Public SSH key associated with the cluster nodes"},"subnets":{"type":"array","items":{"type":"string","description":"The public subnet ID to which the cluster is deployed. This parameter is required if vpc (VPC ID) is set and isPrivate is set to false (Public topology). This parameter is required if vpc (VPC ID) is set and isPrivate is set to true (Private topology). This parameter is optional if vpc (VPC ID) is set and isPrivate is set to true and internalElb is set to true (VPN topology). This parameter is ignored if vpc (VPC ID) is not set"}},"tags":{"type":"object","description":"User defined key-value pairs represented as a JSON object"},"usePf9Domain":{"type":"boolean","description":"Set to true if platform9.net domain is used, false otherwise"},"vpc":{"type":"string","description":"If set, creates cluster using this VPC ID. Otherwise, the cluster is deployed on a new VPC. This parameter is required if internalElb is set to true"},"workerFlavor":{"type":"string","description":"Node flavor used for worker node"},"kubeRoleVersion":{"type":"string","description":"Pf9-kube role version to be used when bringing up the cluster."},"cpuManagerPolicy":{"type":"string","description":"options: none, static; default: none"},"topologyManagerPolicy":{"type":"string","description":"options: none, best-effort, restricted, single-numa-node; default: none"},"reservedCPUs":{"type":"string","description":"list of CPUs to be reserved for the system. Ex: 1-3,5"},"dockerPrivateRegistry":{"type":"string","description":"(optional) URL of private Docker registry to fetch Platform9 images from"},"quayPrivateRegistry":{"type":"string","description":"(optional) URL of private Quay registry to fetch Platform9 images from"},"gcrPrivateRegistry":{"type":"string","description":"(optional) URL of private GCR registry to fetch Platform9 images from"},"k8sPrivateRegistry":{"type":"string","description":"(optional) URL of private K8S registry to fetch Platform9 images from"},"useHostname":{"type":"boolean","description":"(optional) If set to true nodes will be registered in the cluster using hostname instead of IP address. This option is only applicable to IPv4 hosts. This option is ignored when deploying clusters on IPv6 enabled hosts and public clouds - AWS, Azure, etc."},"enableProfileAgent":{"type":"boolean","description":"(optional) If set to true platform9 profile engine agent will be deployed on the cluster. This agent is required to be able to use profiles."},"enableCatapultMonitoring":{"type":"boolean","description":"(optional) If set to true (default value) platform9 Catapult monitoring will be deployed on the cluster"},"dockerCentosPackageRepoUrl":{"type":"string","description":"(optional) URL of the centos repo to be used for docker installation, this URL is added as a first mirror optiopn"},"dockerUbuntuPackageRepoUrl":{"type":"string","description":"(optional) URL of the ubuntu repo to be used for docker installation, this URL is added as a first mirror option"},"containerRuntime":{"type":"string","description":"(optional) Container runtime for this cluster. Valid values: [docker, containerd]"},"certExpiryHrs":{"type":"integer","description":"(optional) Number of hours before user certificates in kubeconfig expires, should be greater than 0 if set. Default is 24hrs."},"interfaceDetectionMethod":{"type":"string","description":"(optional) Host Network interface detection method for cluster. Options:[FirstFound/InterfaceName/InterfaceReachableIP] Default: FirstFound"},"interfaceReachableIP":{"type":"string","description":"Select interface on host that can reach the given IP (Required when interfaceDetectionMethod=InterfaceReachableIP)"},"interfaceName":{"type":"string","description":"Select interface on host for given Interfacename (Required when interfaceDetectionMethod=InterfaceName)"},"customRegistryUrl":{"type":"string","description":"URL for a custom registry that is expected to serve all images for the cluster"},"customRegistryRepoPath":{"type":"string","description":"path in custom registry where all images are cached"},"customRegistryUsername":{"type":"string","description":"username for the custom registry"},"customRegistryPassword":{"type":"string","description":"password for the custom registry"},"customRegistrySkipTls":{"type":"boolean","description":"configure containerd to skip tls verification for custom registry"},"customRegistrySelfSignedCerts":{"type":"boolean","description":"Set to true if the custom registry uses self signed certs"},"customRegistryCertPath":{"type":"string","description":"Path to the cert file for the custom registry if using self signed certs. Can be of the following formats: [https://example.com/path/to/cert, http://example.com/path/to/cert, file:///path/to/cert, /path/to/cert]"},"deployLuigiOperator":{"type":"boolean","description":"Set to true if Luigi is deployed "},"deployKubevirt":{"type":"boolean","description":"Set to true if Kubevirt is deployed "},"etcdHeartbeatIntervalMs":{"type":"integer","description":"Frequency with which master node will notify workers"},"etcdElectionTimeoutMs":{"type":"integer","description":"This timeout is how long a worker node will go without hearing a heartbeat,before attempting to become master"},"monitoring":{"$ref":"#/components/schemas/monitoring","description":"Prometheus monitoring addon settings"},"addonVersions":{"type":"object","properties":{"coredns":{"type":"string","description":"coredns version"},"dashboard":{"type":"string","description":"dashboard version"},"dns-autoscaler":{"type":"string","description":"dns-autoscaler version"},"kubevirt":{"type":"string","description":"kubevirt version"},"luigi":{"type":"string","description":"luigi version"},"metal3":{"type":"string","description":"metal3 version"},"metallb":{"type":"string","description":"metallb version"},"metricsserver":{"type":"string","description":"metricsserver version"},"monitoring":{"type":"string","description":"monitoring version"},"profileagent":{"type":"string","description":"profileagent version"},"cluster-autoscaler-aws":{"type":"string","description":"cluster-autoscaler-aws version"},"cluster-autoscaler-azure":{"type":"string","description":"cluster-autoscaler-azure version"}}}}},"etcd_backup":{"type":"object","properties":{"isEtcdBackupEnabled":{"type":"boolean","description":"Set to true if etcd backup should be enabled, false otherwise"},"intervalInMins":{"type":"integer","description":"etcd backup interval, specified in minutes. intervalInMins and intervalInHours are mutually exclusive"},"intervalInHours":{"type":"integer","description":"etcd backup interval, specified in Hours. intervalInMins and intervalInHours are mutually exclusive"},"dailyBackupTime":{"type":"string","description":"etcd backup Timestamp for daily backup, specified in format 'HH:MM' "},"maxIntervalBackupCount":{"type":"integer","description":"max number of Backups retention for interval type backups, required if intervalInMins or intervalInHours is provided"},"maxTimestampBackupCount":{"type":"integer","description":"max number of Backups retention for Timestamp type backups, required if dailyBackupTime is provided"},"storageType":{"type":"string","description":"Storage type for the etcd backup. Only 'local' is current supported type. 'local' saves backup to the node's local disk"},"storageProperties":{"$ref":"#/components/schemas/etcdbackup_storageproperties"}}},"etcdbackup_storageproperties":{"type":"object","properties":{"localPath":{"type":"string","description":"Path on the local filesystem where the etcd backup should be stored. For 'local' storage type only."}}},"monitoring":{"type":"object","properties":{"retentionTime":{"type":"string","description":"Retention time of the metrics."}}}}}}
```

## POST /v4/{projectId}/clusters/{uuid}/upgrade

> Upgrade a cluster, identified by the uuid

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/clusters/{uuid}/upgrade":{"post":{"tags":["Cluster"],"summary":"Upgrade a cluster, identified by the uuid","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"uuid","in":"path","required":true,"description":"UUID of the cluster"},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cloud provider account belongs to"},{"schema":{"type":"string"},"name":"type","in":"query","required":true,"description":"Type of upgrade minor or patch"},{"schema":{"type":"boolean"},"name":"force","in":"query","description":"(optional)Forcefully upgrade cluster to version. Default is false."}],"responses":{"200":{"description":"OK, if upgrade request is successfully issued"},"403":{"description":"Unauthorized to perform this operation"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/cluster_upgrade_body"}}},"required":false}}}},"components":{"schemas":{"cluster_upgrade_body":{"type":"object","properties":{"allowWorkloadsOnMaster":{"type":"integer","description":"Field is set to 1 if the master nodes can run non-critical workloads"},"apiServerFlags":{"type":"array","items":{"type":"string"},"description":"List of kube-apiserver flags. (e.g. --request-timeout=2m0s, --kubelet-timeout=20s)"},"batchUpgradePercent":{"type":"number","description":"Number between 1-100 which represents the percent of worker nodes to upgrade in parallel at once during an upgrade"},"batchUpgradeNodes":{"type":"array","items":{"type":"string"},"description":"List of worker nodes uuids to upgrade in parallel at once during an upgrade"},"calicoControllerCpuLimit":{"type":"string","description":"Corresponds to the CALICO_CONTROLLER_CPU_LIMIT environment variable in Calico."},"calicoControllerMemoryLimit":{"type":"string","description":"Corresponds to the CALICO_CONTROLLER_MEMORY_LIMIT environment variable in Calico."},"calicoIPv4DetectionMethod":{"type":"string","description":"IPV4 detection method for calico. Options: FirstFound, InterfaceName, InterfaceReachableIP"},"calicoNodeCpuLimit":{"type":"string","description":"Corresponds to the CALICO_NODE_CPU_LIMIT environment variable in Calico."},"calicoNodeMemoryLimit":{"type":"string","description":"Corresponds to the CALICO_NODE_MEMORY_LIMIT environment variable in Calico."},"calicoTyphaCpuLimit":{"type":"string","description":"Corresponds to the CALICO_TYPHA_CPU_LIMIT environment variable in Calico."},"calicoTyphaMemoryLimit":{"type":"string","description":"Corresponds to the CALICO_TYPHA_MEMORY_LIMIT environment variable in Calico."},"controllerManagerFlags":{"type":"array","items":{"type":"string"},"description":"List of kube-controller-manager flags. (e.g. --large-cluster-size-threshold=60, --node-monitor-period =5s)"},"containerRuntime":{"type":"string","description":"(optional) Container runtime for this cluster. Valid values: [docker, containerd]"},"customRegistryUrl":{"type":"string","description":"URL for a custom registry that is expected to serve all images for the cluster"},"customRegistryRepoPath":{"type":"string","description":"path in custom registry where all images are cached"},"customRegistryUsername":{"type":"string","description":"username for the custom registry"},"customRegistryPassword":{"type":"string","description":"password for the custom registry"},"customRegistrySkipTls":{"type":"boolean","description":"configure containerd to skip tls verification for custom registry"},"customRegistrySelfSignedCerts":{"type":"boolean","description":"Set to true if the custom registry uses self signed certs"},"customRegistryCertPath":{"type":"string","description":"Path to the cert file for the custom registry if using self signed certs. Can be of the following formats: [https://example.com/path/to/cert, http://example.com/path/to/cert, file:///path/to/cert, /path/to/cert]"},"privileged":{"type":"boolean","description":"Field is set to 1 if cluster runs privileged containers, 0 otherwise"},"schedulerFlags":{"type":"array","items":{"type":"string"},"description":"List of kube-scheduler flags. (e.g. --kube-api-burst=120, --log-flush-frequency=5s)"},"addonVersions":{"type":"object","properties":{"coredns":{"type":"string","description":"coredns version"},"dashboard":{"type":"string","description":"dashboard version"},"dns-autoscaler":{"type":"string","description":"dns-autoscaler version"},"kubevirt":{"type":"string","description":"kubevirt version"},"luigi":{"type":"string","description":"luigi version"},"metal3":{"type":"string","description":"metal3 version"},"metallb":{"type":"string","description":"metallb version"},"metricsserver":{"type":"string","description":"metricsserver version"},"monitoring":{"type":"string","description":"monitoring version"},"profileagent":{"type":"string","description":"profileagent version"},"cluster-autoscaler-aws":{"type":"string","description":"cluster-autoscaler-aws version"},"cluster-autoscaler-azure":{"type":"string","description":"cluster-autoscaler-azure version"}}}}}}}}
```

## DELETE /v4/{projectId}/clusters/{clusterId}/addons

> Delete all cluster addons for a PMK cluster as specified by the cluster UUID

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/clusters/{clusterId}/addons":{"delete":{"tags":["Cluster"],"summary":"Delete all cluster addons for a PMK cluster as specified by the cluster UUID","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"clusterId","in":"path","required":true,"description":"UUID of the cluster"},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cluster belongs to"}],"responses":{"200":{"description":"OK, if clusteraddons delete request was submitted successfully"},"403":{"description":"Unauthorized to perform this operation"}}}}}}
```

## PUT /v4/{projectId}/clusters/{clusterID}/addons/{addonType}/watch

> Set the watch flag on a ClusterAddon to enable or disable drift protection

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/clusters/{clusterID}/addons/{addonType}/watch":{"put":{"tags":["Cluster"],"summary":"Set the watch flag on a ClusterAddon to enable or disable drift protection","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cluster belongs to"},{"schema":{"type":"string"},"name":"clusterID","in":"path","required":true,"description":"UUID of the cluster"},{"schema":{"type":"string"},"name":"addonType","in":"path","required":true,"description":"Type of the addon (e.g. monitoring, coredns)"}],"responses":{"200":{"description":"OK, watch flag updated successfully"},"400":{"description":"Bad request, watch field missing or not boolean"},"404":{"description":"Addon of the specified type not found for the cluster"},"500":{"description":"Internal server error, failed to list or update addon in sunpike"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/addon_watch_flag_body"}}},"required":true}}}},"components":{"schemas":{"addon_watch_flag_body":{"type":"object","required":["watch"],"properties":{"watch":{"type":"boolean","description":"Set to true to enable watch (drift protection) on the addon, false to disable"}}}}}}
```

## GET /v4/{projectId}/clusters/{clusterId}/addonversions

> Provides a list of addon version for pf9-kube role on a cluster.

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/clusters/{clusterId}/addonversions":{"get":{"tags":["Cluster"],"summary":"Provides a list of addon version for pf9-kube role on a cluster.","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"clusterId","in":"path","required":true,"description":"UUID of the cluster"},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cluster belongs to"}],"responses":{"200":{"description":"OK, List of addon versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/addonversions_get_details"}}}}}}}},"components":{"schemas":{"addonversions_get_details":{"type":"object","properties":{"metricsserver":{"type":"string","description":"metricsserver version used for the cluster"},"metallb":{"type":"string","description":"metallb version used for the cluster if applicable"},"dashboard":{"type":"string","description":"ks8 dashboard version used for the cluster if applicable"},"cni":{"type":"string","description":"cni version used for the cluster"},"luigi":{"type":"string","description":"luigi version used for the cluster if applicable"},"kustomize":{"type":"string","description":"kustomize version used for the cluster"},"calico":{"type":"string","description":"calico version used for the cluster if applicable"},"kubevirtaddon":{"type":"string","description":"kubevirtaddon version used for the cluster if applicable"},"monitoring":{"type":"string","description":"monitoring version used for the cluster if applicable"},"kubernetes":{"type":"string","description":"kubernetes version used for the cluster"},"coredns":{"type":"string","description":"coredns version used for the cluster"},"cascapi":{"type":"string","description":"cascapi version used for the cluster if applicable"},"flannel":{"type":"string","description":"flannel version used for the cluster if applicable"},"profileagent":{"type":"string","description":"profileagent version used for the cluster if applicable"},"metal3":{"type":"string","description":"metal3 version used for the cluster if applicable"},"casazure":{"type":"string","description":"casazure version used for the cluster if applicable"},"etcd":{"type":"string","description":"etcd version used for the cluster"}}}}}}
```

## GET /v4/{projectId}/clusters/supportedRoleVersions

> Provides a list of supported pf9-kube roles for a cluster.

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/clusters/supportedRoleVersions":{"get":{"tags":["Cluster"],"summary":"Provides a list of supported pf9-kube roles for a cluster.","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cluster belongs to"}],"responses":{"200":{"description":"OK, List of supported roles versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supportedRoleVersions_get_details"}}}}}}}},"components":{"schemas":{"supportedRoleVersions_get_details":{"type":"object","properties":{"count":{"type":"integer","description":"Number of supported role versions"},"roles":{"type":"array","description":"List of supported role versions","items":{"$ref":"#/components/schemas/supportedRoleVersion"}}}},"supportedRoleVersion":{"type":"object","properties":{"uuid":{"type":"string","description":"UUID of the role"},"k8sMajorVersion":{"type":"integer","description":"major version of k8s for roleversion"},"k8sMinorVersion":{"type":"integer","description":"minor version of k8s for roleversion"},"k8sPatchVersion":{"type":"integer","description":"patch version of k8s for roleversion"},"pf9PatchVersion":{"type":"integer","description":"patch version of pf9 for roleversion"},"roleVersion":{"type":"string","description":"full version of the role"},"addonsDetails":{"type":"string","description":"addons details containing names with their versions"},"metadata":{"type":"string","description":"metadata for the roleversion"},"supported":{"type":"string","description":"shows the role is supported"}}}}}}
```

## GET /v4/{projectId}/clusters/{uuid}

> Get details of a cluster

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/clusters/{uuid}":{"get":{"tags":["Cluster"],"summary":"Get details of a cluster","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"uuid","in":"path","required":true,"description":"UUID of the cluster"},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cluster belongs to"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/cluster_details"}}}},"403":{"description":"unauthorized to perform this operation"}}}}},"components":{"schemas":{"cluster_details":{"type":"object","properties":{"name":{"type":"string","description":"Name of the cluster"},"uuid":{"type":"string","description":"UUID of the cluster"},"created_at":{"type":"string","description":"Creation time of the cluster"},"projectId":{"type":"string","description":"UUID of the Keystone project that this cluster is part of"},"isKubernetes":{"type":"integer","description":"Field is set to 1 if the cluster is a Kubernetes cluster, 0 otherwise"},"kubeRoleVersion":{"type":"string","description":"The version of the pf9-kube role"},"etcdVersion":{"type":"string","description":"The version of etcd used for cluster"},"isAirgapped":{"type":"integer","description":"Field is set to 1 if the cluster is air-gapped, 0 otherwise"},"useHostname":{"type":"boolean","description":"(optioanl) If set to true nodes will be registered in the cluster using hostname instead of IP address. This option is only applicable to IPv4 hosts. This option is ignored when deploying clusters on IPv6 enabled hosts and public clouds - AWS, Azure, etc."},"allowWorkloadsOnMaster":{"type":"integer","description":"Field is set to 1 if the master nodes can run non-critical workloads"},"containerRuntime":{"type":"string","description":"(optional) Container runtime for this cluster. Valid values: [docker, containerd]"},"containersCidr":{"type":"string","description":"CIDR used for container IP addresses"},"servicesCidr":{"type":"string","description":"CIDR used for service IP addresses"},"externalDnsName":{"type":"string","description":"Optional DNS name for API endpoint. This field is autogenerated when pf9 domain is used."},"privileged":{"type":"integer","description":"Field is set to 1 if cluster runs privileged containers, 0 otherwise"},"runtimeConfig":{"type":"string","description":""},"kubeProxyMode":{"type":"string","description":"The mode of kube proxy"},"apiserverStorageBackend":{"type":"string","description":"The storage backend of the api server"},"k8sApiPort":{"type":"string","description":"Port on which K8S API Server will listen, 443 by default"},"masterIp":{"type":"string","description":"Ip of the master node, applicable only for cloud provider type 'openstack'"},"masterVipIpv4":{"type":"string","description":"API server Virtual IP that provides failover if specified for the cluster. Defaults to empty string"},"masterVipIface":{"type":"string","description":"The interface that VIP attaches to if specified. Defaults to empty string"},"masterVipVrouterId":{"type":"string","description":"Virtual router id choosen for the cluster. Range: 0-254. Emptry string if masterVipIpv4 not specified"},"networkPlugin":{"type":"string","description":"Network backend to use for container networking. Defaults to flannel. Supported choices are flannel, calico, noop, weave"},"addonOperatorImageTag":{"type":"string","description":"(optional) addon operator image tag for this cluster."},"dockerRoot":{"type":"string","description":"Root directory for docker"},"etcdDataDir":{"type":"string","description":"Data directory for etcd. The field is applicable to master nodes only"},"certExpiryHrs":{"type":"integer","description":"(optional) Number of hours before user certificates in kubeconfig expires, should be greater than 0 if set. Default is 24hrs."},"keystoneEnabled":{"type":"integer","description":"Field is set to 1 if keystone is enabled, 0 otherwise"},"authzEnabled":{"type":"integer","description":"Field is set to 1 if authz is enabled, 0 otherwise"},"appCatalogEnabled":{"type":"integer","description":"DEPRECATED. Field doesn't lead to any action on the cluster now. Field is set to 1 if app catalog is enabled, 0 otherwise"},"enableProfileAgent":{"type":"boolean","description":"(optional) If set to true platform9 profile engine agent will be deployed on the cluster. This agent is required to be able to use profiles."},"enableEtcdEncryption":{"type":"string","description":"States whether tls encryption is enabled on etcd, Default:false"},"etcdBackup":{"$ref":"#/components/schemas/etcd_backup_for_get"},"ipv6":{"type":"boolean","description":"Set to 1 if ipv6 enabled. Defaults to 0"},"enableMetallb":{"type":"boolean","description":"1 if metallb enabled. Defaults to 0"},"metallbCidr":{"type":"string","description":"Comma separated pools of IPs like A.B.C.D-E.F.G.H, I.J.K.L-M.N.O.P that metallb will manage if specified"},"base64EncMetallbConfig":{"type":"string","description":"Base64 encoded string of metallb custom resource yaml"},"nodePoolUuid":{"type":"string","description":"UUID of the node pool used for the cluster"},"nodePoolName":{"type":"string","description":"Name of the node pool used for the cluster"},"cloudProviderUuid":{"type":"string","description":"UUID of the cloud provider used to create this cluster"},"cloudProviderName":{"type":"string","description":"Name of the cloud provider used to create this cluster"},"cloudProviderType":{"type":"string","description":"Type of the cloud provider used to create this cluster"},"cloudProperties":{"$ref":"#/components/schemas/cloud_properties"},"tags":{"type":"object","description":"User defined key-value pairs represented as a JSON object"},"mtuSize":{"type":"string","description":"MTU for container network interfaces. Optional and used for the Calico network backend"},"cpuManagerPolicy":{"type":"string","description":"options: none, static; default: none"},"topologyManagerPolicy":{"type":"string","description":"options: none, best-effort, restricted, single-numa-node; default: none"},"reservedCPUs":{"type":"string","description":"list of CPUs to be reserved for the system. Ex: 1-3,5"},"numMasters":{"type":"integer","description":"Number of master nodes in the cluster"},"numWorkers":{"type":"integer","description":"Number of worker nodes in the cluster"},"status":{"type":"string","description":"Status of the cluster"},"masterStatus":{"type":"string","description":"Status of the master nodes. 'healthy' means all masters are healthy. 'partially healthy' means quorum number of masters are healthy, but some are not. 'unhealthy' means quorum number of master are unhealthy"},"workerStatus":{"type":"string","description":"Status of the worker nodes. 'healthy' means all workers are healthy. 'partially healthy' means more than 50% of the workers are healthy, rest are unhealthy. 'unhealthy' means more than 50% of the workers are unhealthy"},"lastOp":{"type":"string","description":"The last operation such as node attach or node detach that was performed on the cluster"},"lastOk":{"type":"string","description":"The timestamp when the cluster last reported an OK status"},"taskStatus":{"type":"string","description":"Status of the last task that run on the cluster."},"taskError":{"type":"string","description":"Error details if the last task on cluster did not succeed"},"debug":{"type":"string","description":"enable debug"},"masterless":{"type":"integer","description":"1 if masterless cluster, 0 otherwise"},"upgradingTo":{"type":"string","description":"The version that the cluster is upgrading to"},"canUpgrade":{"type":"boolean","description":"Field is set to true if the cluster can be upgraded, false otherwise"},"canMinorUpgrade":{"type":"integer","description":"Field is set to 1 if the cluster can be upgraded to a minor version, 0 otherwise"},"canPatchUpgrade":{"type":"integer","description":"Field is set to 1 if the cluster can be upgraded to a patch version, 0 otherwise"},"minorUpgradeRoleVersion":{"type":"string","description":"The minor version of the pf9-kube role that can be upgraded"},"patchUpgradeRoleVersion":{"type":"string","description":"The patch version of the pf9-kube role that can be upgraded"},"flannelIfaceLabel":{"type":"string","description":"The interface used by flannel for interhost communication"},"flannelPublicIfaceLabel":{"type":"string","description":"The IP address used as the flannel public IP for the nodes in the cluster"},"calicoIPv4":{"type":"string","description":"Calico IPv4 mode"},"calicoIPv4DetectionMethod":{"type":"string","description":"Calico IPv4 detection method"},"calicoV4BlockSize":{"type":"string","description":"Subnet size per node for the Calico network, in CIDR notation (e.g. 26)"},"calicoIPv6":{"type":"string","description":"Calico IPv6 mode"},"calicoIPv6DetectionMethod":{"type":"string","description":"Calico IPv6 detection method"},"calicoIPv6PoolCidr":{"type":"string","description":"Calico IPv6 pool CIDR"},"calicoIPv6PoolBlockSize":{"type":"string","description":"Calico IPv6 pool block size"},"calicoIPv6PoolNatOutgoing":{"type":"integer","description":"Calico IPv6 pool NAT outgoing"},"calicoRouterID":{"type":"string","description":"Calico router ID"},"calicoIpIpMode":{"type":"string","description":"IP-IP encapsulation mode for Calico network. Choose: Always, Never, CrossSubnet"},"calicoNatOutgoing":{"type":"boolean","description":"Field is set to true if Calico nodes need to NAT north-south egress traffic."},"calicoNodeCpuLimit":{"type":"string","description":"Corresponds to the CALICO_NODE_CPU_LIMIT environment variable in Calico."},"calicoNodeMemoryLimit":{"type":"string","description":"Corresponds to the CALICO_NODE_MEMORY_LIMIT environment variable in Calico."},"calicoTyphaCpuLimit":{"type":"string","description":"Corresponds to the CALICO_TYPHA_CPU_LIMIT environment variable in Calico."},"calicoTyphaMemoryLimit":{"type":"string","description":"Corresponds to the CALICO_TYPHA_MEMORY_LIMIT environment variable in Calico."},"calicoControllerCpuLimit":{"type":"string","description":"Corresponds to the CALICO_CONTROLLER_CPU_LIMIT environment variable in Calico."},"calicoControllerMemoryLimit":{"type":"string","description":"Corresponds to the CALICO_CONTROLLER_MEMORY_LIMIT environment variable in Calico."},"felixIPv6Support":{"type":"integer","description":"Field is set to true if Felix supports IPv6"},"dockerCentosPackageRepoUrl":{"type":"string","description":"(optional) URL of the centos repo to be used for docker installation"},"dockerUbuntuPackageRepoUrl":{"type":"string","description":"(optional) URL of the ubuntu repo to be used for docker installation"},"dockerPrivateRegistry":{"type":"string","description":"(optional) URL of private Docker registry to fetch Platform9 images from"},"quayPrivateRegistry":{"type":"string","description":"(optional) URL of private Quay registry to fetch Platform9 images from"},"gcrPrivateRegistry":{"type":"string","description":"(optional) URL of private GCR registry to fetch Platform9 images from"},"k8sPrivateRegistry":{"type":"string","description":"(optional) URL of private K8S registry to fetch Platform9 images from"},"customRegistryUrl":{"type":"string","description":"URL for a custom registry that is expected to serve all images for the cluster"},"customRegistryRepoPath":{"type":"string","description":"path in custom registry where all images are cached"},"customRegistryUsername":{"type":"string","description":"username for the custom registry"},"customRegistryPassword":{"type":"string","description":"password for the custom registry"},"customRegistrySkipTls":{"type":"boolean","description":"configure containerd to skip tls verification for custom registry"},"customRegistrySelfSignedCerts":{"type":"boolean","description":"Set to true if the custom registry uses self signed certs"},"customRegistryCertPath":{"type":"string","description":"Path to the cert file for the custom registry if using self signed certs. Can be of the following formats: [https://example.com/path/to/cert, http://example.com/path/to/cert, file:///path/to/cert, /path/to/cert]"}}},"etcd_backup_for_get":{"type":"object","properties":{"isEtcdBackupEnabled":{"type":"boolean","description":"Set to true if etcd backup should be enabled, false otherwise"},"intervalInMins":{"type":"integer","description":"etcd backup interval, specified in minutes"},"intervalInHours":{"type":"integer","description":"etcd backup interval, specified in Hours"},"dailyBackupTime":{"type":"string","description":"etcd backup Timestamp for daily backup, specified in format 'HH:MM' "},"maxIntervalBackupCount":{"type":"integer","description":"max number of Backups retention for interval type backups"},"maxTimestampBackupCount":{"type":"integer","description":"max number of Backups retention for Timestamp type backups"},"storageType":{"type":"string","description":"Storage type for the etcd backup. Only 'local' is current supported type. 'local' saves backup to the node's local disk"},"storageProperties":{"$ref":"#/components/schemas/etcdbackup_storageproperties"},"taskStatus":{"type":"string","description":"Status indicating whether the backup cron job on the Kubernetes cluster was successfully setup. Can be 'success' or 'error'"},"taskErrorDetail":{"type":"string","description":"Details of the error occurred of the taskStatus returned is 'error'"}}},"etcdbackup_storageproperties":{"type":"object","properties":{"localPath":{"type":"string","description":"Path on the local filesystem where the etcd backup should be stored. For 'local' storage type only."}}},"cloud_properties":{"type":"object","properties":{"region":{"type":"string","description":"Cloud provider region in which the cluster was created"},"masterFlavor":{"type":"string","description":"Node flavor used for master node"},"workerFlavor":{"type":"string","description":"Node flavor used for worker node"},"sshKey":{"type":"string","description":"Public SSH key associated with the cluster nodes"},"serviceFqdn":{"type":"string","description":"FQDN used to reference cluster services"},"ami":{"type":"string","description":"AMI ID used to provision cluster nodes"},"domainId":{"type":"string","description":"Domain used for cluster FQDNs"},"isPrivate":{"type":"boolean","description":"Set to true if nodes are deployed using public subnet, false otherwise, applicable also for manual deploy. This parameter is required if internalElb is set to true."},"usePf9Domain":{"type":"string","description":"Set to true if platform9.net domain is used, false otherwise"},"internalElb":{"type":"boolean","description":"Set to true if load balancer is an internal load balancer or false for an Internet-facing load balancer. More information here: https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-internal-load-balancers.html Setting this parameter to true requires that isPrivate is set to true. If the private subnet selected is not configured to route IP packets through a VPN, then an httpProxy is required for node communications to work"},"azs":{"type":"array","items":{"type":"string"},"description":"Availability zone(s) the cluster is deployed in"},"httpProxy":{"type":"string","description":"The http proxy used for node communications. This parameter is required when internalElb is set to true and the private subnet selected does not route IP packets to the internet through a VPN"},"privateSubnets":{"type":"array","items":{"type":"string"},"description":"The private subnet ID to which the cluster is deployed. This parameter is optional if vpc (VPC ID) is set. This parameter is required if vpc (VPC ID) is set and isPrivate is set to true. This parameter is ignored if vpc (VPC ID) is not set"},"subnets":{"type":"array","items":{"type":"string","description":"The public subnet ID to which the cluster is deployed. This parameter is required if vpc (VPC ID) is set and isPrivate is set to false (Public topology). This parameter is required if vpc (VPC ID) is set and isPrivate is set to true (Private topology). This parameter is optional if vpc (VPC ID) is set and isPrivate is set to true and internalElb is set to true (VPN topology). This parameter is ignored if vpc (VPC ID) is not set"}},"vpc":{"type":"string","description":"If set, creates cluster using this VPC ID. Otherwise, the cluster is deployed on a new VPC. This parameter is required if internalElb is set to true"},"customAmi":{"type":"string","description":"The custom ami name which can be specified by a user"}}}}}}
```

## PUT /v4/{projectId}/clusters/{uuid}

> Update the properties of a cluster specified by the cluster\_uuid

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/clusters/{uuid}":{"put":{"tags":["Cluster"],"summary":"Update the properties of a cluster specified by the cluster_uuid","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"uuid","in":"path","required":true,"description":"UUID of the cluster"},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cluster belongs to"}],"responses":{"200":{"description":"OK, if cluster upgrade request was submitted successfully"},"403":{"description":"Unauthorized to perform this operation"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/cluster_details_for_put"}}},"required":true}}}},"components":{"schemas":{"cluster_details_for_put":{"type":"object","properties":{"numWorkers":{"type":"integer","description":"Number of worker nodes in the cluster. For AWS cluster, this parameter is relevant only if cluster autoscaling is disabled"},"numMinWorkers":{"type":"integer","description":"Minimum number of worker nodes in ASG for AWS cluster. This parameter is relevant only if cluster autoscaling is enabled"},"numMaxWorkers":{"type":"integer","description":"Maximum number of worker nodes in ASG for AWS cluster. This parameter is relevant only if cluster autoscaling is enabled"},"etcdBackup":{"$ref":"#/components/schemas/etcd_backup"},"tags":{"type":"object","description":"User defined key-value pairs represented as a JSON object"},"customAmi":{"type":"string","description":"The custom ami name which can be specified by a user"},"enableProfileAgent":{"type":"boolean","description":"(optional) If set to true platform9 profile engine agent will be deployed on the cluster. This agent is required to be able to use profiles."},"dockerCentosPackageRepoUrl":{"type":"string","description":"(optional) URL of the centos repo to be used for docker installation"},"dockerUbuntuPackageRepoUrl":{"type":"string","description":"(optional) URL of the ubuntu repo to be used for docker installation"},"certExpiryHrs":{"type":"integer","description":"(optional) Number of hours before user certificates in kubeconfig expires, should be greater than 0 if set. Default is 24hrs."},"ebsVolumeThroughput":{"type":"integer","description":"(optional) throughput for default gp3 root volume"},"ebsVolumeIops":{"type":"integer","description":"(optional) iops for default gp3 root volume"}}},"etcd_backup":{"type":"object","properties":{"isEtcdBackupEnabled":{"type":"boolean","description":"Set to true if etcd backup should be enabled, false otherwise"},"intervalInMins":{"type":"integer","description":"etcd backup interval, specified in minutes. intervalInMins and intervalInHours are mutually exclusive"},"intervalInHours":{"type":"integer","description":"etcd backup interval, specified in Hours. intervalInMins and intervalInHours are mutually exclusive"},"dailyBackupTime":{"type":"string","description":"etcd backup Timestamp for daily backup, specified in format 'HH:MM' "},"maxIntervalBackupCount":{"type":"integer","description":"max number of Backups retention for interval type backups, required if intervalInMins or intervalInHours is provided"},"maxTimestampBackupCount":{"type":"integer","description":"max number of Backups retention for Timestamp type backups, required if dailyBackupTime is provided"},"storageType":{"type":"string","description":"Storage type for the etcd backup. Only 'local' is current supported type. 'local' saves backup to the node's local disk"},"storageProperties":{"$ref":"#/components/schemas/etcdbackup_storageproperties"}}},"etcdbackup_storageproperties":{"type":"object","properties":{"localPath":{"type":"string","description":"Path on the local filesystem where the etcd backup should be stored. For 'local' storage type only."}}}}}}
```

## DELETE /v4/{projectId}/clusters/{uuid}

> Delete a cluster from PMK as specified by the cluster UUID

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/clusters/{uuid}":{"delete":{"tags":["Cluster"],"summary":"Delete a cluster from PMK as specified by the cluster UUID","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"uuid","in":"path","required":true,"description":"UUID of the cluster"},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cluster belongs to"}],"responses":{"200":{"description":"OK, if cluster delete request was submitted successfully"},"403":{"description":"Unauthorized to perform this operation"}}}}}}
```

## GET /v4/{projectId}/clusters/{uuid}/nodes

> Get nodes of a cluster

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/clusters/{uuid}/nodes":{"get":{"tags":["Cluster"],"summary":"Get nodes of a cluster","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"uuid","in":"path","required":true,"description":"UUID of the cluster"},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cluster belongs to"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/node_details"}}}}},"403":{"description":"unauthorized to perform this operation"}}}}},"components":{"schemas":{"node_details":{"type":"object","properties":{"name":{"type":"string","description":"Host name of the node"},"uuid":{"type":"string","description":"UUID of the node"},"primaryIp":{"type":"string","description":"IP address of the node"},"nodePoolName":{"type":"string","description":"Name of the node pool, the node belongs to"},"nodePoolUuid":{"type":"string","description":"UUID of the node pool, the node belongs to"},"cloudProviderType":{"type":"string","description":"Type of cloud provider, such as local or aws used to create the cluster"},"cloudProviderUuid":{"type":"string","description":"UUID of the cloud provider used to create the cluster"},"cloudInstanceId":{"type":"string","description":"UUID of the cloud instance used to create the cluster"},"clusterName":{"type":"string","description":"Name of the cluster the node belongs to"},"clusterUuid":{"type":"string","description":"UUID of the cluster the node belongs to"},"projectId":{"type":"string","description":"UUID of the project the node belongs to"},"actualKubeRoleVersion":{"type":"string","description":"actual version of the kube role on the node"},"clusterKubeRoleVersion":{"type":"string","description":"Kube version of the cluster the node belongs to"},"isMaster":{"type":"integer","description":"1 if this node is a master of a custer. 0 otherwise."},"api_responding":{"type":"integer","description":"1 indicates the API server on this node is running. 0 otherwise. Applicable only if isMaster is 1"},"status":{"type":"string","description":"Status of the node. States include “ok”, ”converging”, “failed”. These states indicate the current state of kubernetes setup on the host."},"masterless":{"type":"integer","description":"1 indicates the node is a masterless node. 0 otherwise"},"startKube":{"type":"integer","description":"1 indicates kube to be installed on the node . 0 otherwise"}}}}}}
```

## GET /v4/{projectId}/kubeconfig/{cluster\_uuid}

> Get the kubeconfig blob for the specific cluster

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/kubeconfig/{cluster_uuid}":{"get":{"tags":["Cluster"],"summary":"Get the kubeconfig blob for the specific cluster","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"cluster_uuid","in":"path","required":true,"description":"UUID of the cluster"},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cluster belongs to"},{"schema":{"type":"boolean"},"name":"force_cert_auth","in":"query","description":"If true, generates certificate based kubeconfig. Default is false."}],"responses":{"200":{"description":"The response is a blob sent with the Content-Type ‘application/octet-stream’"},"403":{"description":"Unauthorized to perform this operation"}}}}}}
```

## POST /v4/{projectId}/webcli/{uuid}

> Generate token to be used by web cli

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/webcli/{uuid}":{"post":{"tags":["Cluster"],"summary":"Generate token to be used by web cli","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"uuid","in":"path","required":true,"description":"UUID of the cluster"},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cluster belongs to"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webcli_token"}}}},"403":{"description":"Unauthorized to perform this operation"}}}}},"components":{"schemas":{"webcli_token":{"type":"object","properties":{"token":{"type":"string","description":"Web cli token"}}}}}}
```

## POST /v4/{projectId}/clusters/{uuid}/attach

> Attach nodes to a cluster. In a manual deployed cluster, nodes can be added to a cluster using this API. If the cluster has no masters, multiple masters can be attached simultaneously.

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/clusters/{uuid}/attach":{"post":{"tags":["Cluster"],"summary":"Attach nodes to a cluster. In a manual deployed cluster, nodes can be added to a cluster using this API. If the cluster has no masters, multiple masters can be attached simultaneously.","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"uuid","in":"path","required":true,"description":"UUID of the cluster"},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cluster belongs to"}],"responses":{"200":{"description":"OK, if the node get attached to the cluster"},"403":{"description":"Unauthorized to perform this operation"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/attach_nodes_array"}}},"required":true}}}},"components":{"schemas":{"attach_nodes_array":{"type":"array","items":{"type":"object","required":["uuid"],"properties":{"uuid":{"type":"string","description":"UUID of the node"},"isMaster":{"type":"boolean","description":"true if the node should be attached as master, false otherwise."}}}}}}}
```

## POST /v4/{projectId}/clusters/{uuid}/detach

> Detach nodes from a cluster. In a manual deployed cluster, nodes can be removed from a cluster using this API.

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/clusters/{uuid}/detach":{"post":{"tags":["Cluster"],"summary":"Detach nodes from a cluster. In a manual deployed cluster, nodes can be removed from a cluster using this API.","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"uuid","in":"path","required":true,"description":"UUID of the cluster"},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cluster belongs to"}],"responses":{"200":{"description":"OK, if the node get attached to the cluster"},"403":{"description":"Unauthorized to perform this operation"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/detach_nodes_array"}}},"required":true}}}},"components":{"schemas":{"detach_nodes_array":{"type":"array","items":{"type":"object","required":["uuid"],"properties":{"uuid":{"type":"string","description":"UUID of the node"},"isMaster":{"type":"boolean","description":"true if the node should be attached as master, false otherwise."}}}}}}}
```

## GET /v4/{projectId}/kubeletconfig

> Get kubelet config

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/kubeletconfig":{"get":{"tags":["Cluster"],"summary":"Get kubelet config","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the clusters belongs to"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kubelet_config_get_details"}}}},"403":{"description":"unauthorized to perform this operation"}}}}},"components":{"schemas":{"kubelet_config_get_details":{"type":"object","properties":{"sampleKubeletConfig":{"type":"object","properties":{"worker":{"type":"string","description":"Base64 encoded string of the sample kubelet config for worker nodes"},"master":{"type":"string","description":"Base64 encoded string of the sample kubelet config for master nodes"}}},"customKubeletConfig":{"type":"array","items":{"type":"object","properties":{"clusterId":{"type":"string","description":"Id of the cluster to which the config belongs"},"config":{"type":"array","items":{"$ref":"#/components/schemas/kubelet_config"}}}}}}},"kubelet_config":{"type":"object","properties":{"configName":{"type":"string","description":"Name of the configmap"},"configData":{"type":"string","description":"Base64 encoded string of the kubelet config"},"role":{"type":"string","description":"Role of the node for which the config is to be applied"},"nodeIps":{"type":"array","items":{"type":"string"},"description":"List of IPs of the nodes for which the config is to be applied"},"applyAll":{"type":"boolean","description":"Set to true if config is to be applied to all nodes"}}}}}}
```

## POST /v4/{projectId}/kubeletconfig

> Creates kubelet config for a cluster as configmap in sunpike

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/kubeletconfig":{"post":{"tags":["Cluster"],"summary":"Creates kubelet config for a cluster as configmap in sunpike","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the clusters belongs to"}],"responses":{"200":{"description":"OK, if create request was submitted successfully"},"403":{"description":"Unauthorized to perform this operation"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/kubelet_config_post_details"}}},"required":true}}}},"components":{"schemas":{"kubelet_config_post_details":{"type":"array","items":{"type":"object","properties":{"clusterId":{"type":"string","description":"Id of the cluster to which the config belongs"},"config":{"type":"array","items":{"$ref":"#/components/schemas/kubelet_config"}}}}},"kubelet_config":{"type":"object","properties":{"configName":{"type":"string","description":"Name of the configmap"},"configData":{"type":"string","description":"Base64 encoded string of the kubelet config"},"role":{"type":"string","description":"Role of the node for which the config is to be applied"},"nodeIps":{"type":"array","items":{"type":"string"},"description":"List of IPs of the nodes for which the config is to be applied"},"applyAll":{"type":"boolean","description":"Set to true if config is to be applied to all nodes"}}}}}}
```

## PUT /v4/{projectId}/kubeletconfig

> Update the properties of kubelet config

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/kubeletconfig":{"put":{"tags":["Cluster"],"summary":"Update the properties of kubelet config","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the clusters belongs to"}],"responses":{"200":{"description":"OK, if update request was submitted successfully"},"403":{"description":"Unauthorized to perform this operation"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/kubelet_config_put_details"}}},"required":true}}}},"components":{"schemas":{"kubelet_config_put_details":{"type":"array","items":{"type":"object","properties":{"clusterId":{"type":"string","description":"Id of the cluster to which the config belongs"},"config":{"type":"array","items":{"$ref":"#/components/schemas/kubelet_config"}}}}},"kubelet_config":{"type":"object","properties":{"configName":{"type":"string","description":"Name of the configmap"},"configData":{"type":"string","description":"Base64 encoded string of the kubelet config"},"role":{"type":"string","description":"Role of the node for which the config is to be applied"},"nodeIps":{"type":"array","items":{"type":"string"},"description":"List of IPs of the nodes for which the config is to be applied"},"applyAll":{"type":"boolean","description":"Set to true if config is to be applied to all nodes"}}}}}}
```

## DELETE /v4/{projectId}/kubeletconfig

> Delete the kubelet config configmap

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/kubeletconfig":{"delete":{"tags":["Cluster"],"summary":"Delete the kubelet config configmap","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project clusters belongs to"}],"responses":{"200":{"description":"OK, if delete request was submitted successfully"},"403":{"description":"Unauthorized to perform this operation"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/kubelet_config_delete_details"}}},"required":true}}}},"components":{"schemas":{"kubelet_config_delete_details":{"type":"array","items":{"type":"object","properties":{"clusterId":{"type":"string","description":"Id of the cluster to which the config belongs"},"config":{"type":"array","items":{"type":"string"},"description":"List of config names to be deleted"}}}}}}}
```

## PUT /v4/{project\_uuid}/clusters/{uuid}/update\_cni\_on\_migration

> update cluster state after CNI migration

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{project_uuid}/clusters/{uuid}/update_cni_on_migration":{"put":{"tags":["Cluster"],"summary":"update cluster state after CNI migration","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"uuid","in":"path","required":true,"description":"UUID of the cluster"},{"schema":{"type":"string"},"name":"project_uuid","in":"path","required":true,"description":"UUID of the project the cluster belongs to"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/node_details"}}}},"403":{"description":"unauthorized to perform this operation"}}}}},"components":{"schemas":{"node_details":{"type":"object","properties":{"name":{"type":"string","description":"Host name of the node"},"uuid":{"type":"string","description":"UUID of the node"},"primaryIp":{"type":"string","description":"IP address of the node"},"nodePoolName":{"type":"string","description":"Name of the node pool, the node belongs to"},"nodePoolUuid":{"type":"string","description":"UUID of the node pool, the node belongs to"},"cloudProviderType":{"type":"string","description":"Type of cloud provider, such as local or aws used to create the cluster"},"cloudProviderUuid":{"type":"string","description":"UUID of the cloud provider used to create the cluster"},"cloudInstanceId":{"type":"string","description":"UUID of the cloud instance used to create the cluster"},"clusterName":{"type":"string","description":"Name of the cluster the node belongs to"},"clusterUuid":{"type":"string","description":"UUID of the cluster the node belongs to"},"projectId":{"type":"string","description":"UUID of the project the node belongs to"},"actualKubeRoleVersion":{"type":"string","description":"actual version of the kube role on the node"},"clusterKubeRoleVersion":{"type":"string","description":"Kube version of the cluster the node belongs to"},"isMaster":{"type":"integer","description":"1 if this node is a master of a custer. 0 otherwise."},"api_responding":{"type":"integer","description":"1 indicates the API server on this node is running. 0 otherwise. Applicable only if isMaster is 1"},"status":{"type":"string","description":"Status of the node. States include “ok”, ”converging”, “failed”. These states indicate the current state of kubernetes setup on the host."},"masterless":{"type":"integer","description":"1 indicates the node is a masterless node. 0 otherwise"},"startKube":{"type":"integer","description":"1 indicates kube to be installed on the node . 0 otherwise"}}}}}}
```

## PUT /v4/{project\_uuid}/clusters/{uuid}/attach\_on\_failed\_upgrade

> allow attaching nodes post failed upgrade

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{project_uuid}/clusters/{uuid}/attach_on_failed_upgrade":{"put":{"tags":["Cluster"],"summary":"allow attaching nodes post failed upgrade","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"uuid","in":"path","required":true,"description":"UUID of the cluster"},{"schema":{"type":"string"},"name":"project_uuid","in":"path","required":true,"description":"UUID of the project the cluster belongs to"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/node_details"}}}},"403":{"description":"unauthorized to perform this operation"}}}}},"components":{"schemas":{"node_details":{"type":"object","properties":{"name":{"type":"string","description":"Host name of the node"},"uuid":{"type":"string","description":"UUID of the node"},"primaryIp":{"type":"string","description":"IP address of the node"},"nodePoolName":{"type":"string","description":"Name of the node pool, the node belongs to"},"nodePoolUuid":{"type":"string","description":"UUID of the node pool, the node belongs to"},"cloudProviderType":{"type":"string","description":"Type of cloud provider, such as local or aws used to create the cluster"},"cloudProviderUuid":{"type":"string","description":"UUID of the cloud provider used to create the cluster"},"cloudInstanceId":{"type":"string","description":"UUID of the cloud instance used to create the cluster"},"clusterName":{"type":"string","description":"Name of the cluster the node belongs to"},"clusterUuid":{"type":"string","description":"UUID of the cluster the node belongs to"},"projectId":{"type":"string","description":"UUID of the project the node belongs to"},"actualKubeRoleVersion":{"type":"string","description":"actual version of the kube role on the node"},"clusterKubeRoleVersion":{"type":"string","description":"Kube version of the cluster the node belongs to"},"isMaster":{"type":"integer","description":"1 if this node is a master of a custer. 0 otherwise."},"api_responding":{"type":"integer","description":"1 indicates the API server on this node is running. 0 otherwise. Applicable only if isMaster is 1"},"status":{"type":"string","description":"Status of the node. States include “ok”, ”converging”, “failed”. These states indicate the current state of kubernetes setup on the host."},"masterless":{"type":"integer","description":"1 indicates the node is a masterless node. 0 otherwise"},"startKube":{"type":"integer","description":"1 indicates kube to be installed on the node . 0 otherwise"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform9.com/managed-kubernetes/apis/qbert-api/cluster.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
