CreateCluster
/20180222/clusters
Before you create a cluster, ensure that the OraclePCA-OKE/cluster_id defined tag exists in the tenancy. Use ListTagNamespaces and ListTags.
To configure the network, see "Creating Network Resources" (https://docs.oracle.com/en/engineered-systems/private-cloud-appliance/3.0-latest/oke/oke-network.html) in Oracle Private Cloud Appliance Container Engine for Kubernetes.
Specify the following:
Use defined tags to provide the following information for control plane nodes. The tag namespace for all of these tags is OraclePCA. For more information about these parameters, see "Creating an OKE Cluster" (https://docs.oracle.com/en/engineered-systems/private-cloud-appliance/3.0-latest/oke/oke-cluster-create.html#oke-cluster-create).
Do not specify values for the OraclePCA-OKE defined tag or for the ClusterResourceIdentifier free-form tag.
Request
- application/json
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
-
opc-retry-token: string
Minimum Length:
1
Maximum Length:64
A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours.
object
-
clusterPodNetworkOptions:
array clusterPodNetworkOptions
Maximum Number of Items:
255
Unique Items Required:true
Available CNIs and network options for existing and new node pools of the cluster. -
compartmentId(required):
string
The OCID of the compartment in which to create the cluster.Example:
ocid1.compartment.oc1..aaaaaaaafqm2df7ckwmmbtdsl2bgxsw4fcpvkoojytxrqst24yww2tdmtqcq
-
definedTags:
object definedTags
Additional Properties Allowed: additionalPropertiesDefined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"OraclePCA": {"sshkey": "ssh-rsa remainder_of_your_public_SSH_key", "cpNodeCount": 1, "cpNodeShape": "VM.PCAStandard1.Flex", "cpNodeShapeConfig": {"ocpus": 2, "memoryInGBs": 24}}}
-
endpointConfig:
object CreateClusterEndpointConfigDetails
The properties that define the network configuration for the Cluster endpoint.
-
freeformTags:
object freeformTags
Additional Properties Allowed: additionalPropertiesFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
-
governancePolicyConfig:
object CreateGovernancePolicyConfigDetails
The properties that define policy governance.
-
imagePolicyConfig:
object CreateImagePolicyConfigDetails
The properties that define an image verification policy.
-
kmsKeyId:
string
Minimum Length:
1
Maximum Length:255
The OCID of the KMS key to be used as the master encryption key for Kubernetes secret encryption. -
kubernetesVersion(required):
string
The version of Kubernetes to install on the control plane nodes.Example:
v1.9.4
-
name(required):
string
The name of the cluster. Avoid entering confidential information.Example:
My Cluster
-
options:
object ClusterCreateOptions
The properties that define extra options for a cluster.
-
type:
string
Allowed Values:
[ "BASIC_CLUSTER", "ENHANCED_CLUSTER" ]
Type of clusterExample:ENHANCED_CLUSTER
-
vcnId(required):
string
The OCID of the VCN that has the configuration of the oke_vcn VCN described in "Creating an OKE VCN" (https://docs.oracle.com/en/engineered-systems/private-cloud-appliance/3.0-latest/oke/oke-vcn.html#oke-vcn).Example:
ocid1.vcn.oc1.iad.aaaaaaaa5e3hn7hk6y63awlhbvlhsumkn5p3ficbjcevbnoylvptcpkxtsaa
array
255
true
-
Array of:
object ClusterPodNetworkOptionDetails
Discriminator:
cniType
The CNI type and network details applicable to the node pools of the cluster.
object
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing a defined tag key and value, scoped to a namespace. Example: `{"CostCenter": "42"}`
{
"Operations":{
"CostCenter":42
}
}
object
-
object
ClusterEndpointConfig
The properties that define the network configuration for the Cluster endpoint.
object
{
"Department":"Finance"
}
object
-
object
GovernancePolicyConfig
The properties that define whether policy governance is enabled.
object
-
object
ImagePolicyConfig
The properties that define a image verification policy.
object
-
addOns:
object AddOnOptions
The properties that define options for supported add-ons.
-
admissionControllerOptions:
object AdmissionControllerOptions
The properties that define supported admission controllers.
-
kubernetesNetworkConfig:
object KubernetesNetworkConfig
The properties that define the network configuration for Kubernetes.
-
persistentVolumeConfig:
object PersistentVolumeConfigDetails
Configuration to be applied to block volumes created by Kubernetes Persistent Volume Claims (PVC)
-
serviceLbConfig:
object ServiceLbConfigDetails
Configuration to be applied to load balancers created by Kubernetes services
-
serviceLbSubnetIds:
array serviceLbSubnetIds
The subnet that is configured to host the load balancer in an OKE cluster. Specify the OCID of the subnet that has the configuration of the service-lb subnet described in "Creating an OKE Worker Load Balancer Subnet" (https://docs.oracle.com/en/engineered-systems/private-cloud-appliance/3.0-latest/oke/oke-subnet-workerlb.html#oke-subnet-workerlb). Do not specify more than one subnet.
object
cniType
-
cniType(required):
string
Minimum Length:
1
Maximum Length:255
Allowed Values:[ "OCI_VCN_IP_NATIVE", "FLANNEL_OVERLAY" ]
The CNI used by the node pools of this cluster.
object
-
object additionalProperties
The value of the tag. Only the String type is supported.
object
object
-
isPublicIpEnabled:
boolean
Default Value:
false
Whether the cluster should be assigned a public IP address. Defaults to false. Set this to true. -
nsgIds:
array nsgIds
Maximum Number of Items:
5
Unique Items Required:true
A list of the OCIDs of the network security groups (NSGs) to apply to the cluster endpoint. -
subnetId:
string
The regional subnet in which to place the cluster endpoint. Select the subnet that has configuration like the control-plane-endpoint subnet described in "Creating an OKE Control Plane Load Balancer Subnet" (https://docs.oracle.com/en/engineered-systems/private-cloud-appliance/3.0-latest/oke/oke-subnet-controlplanelb.html#oke-subnet-controlplanelb).
array
5
true
-
Array of:
string
Minimum Length:
1
Maximum Length:255
object
-
isPolicyEnabled:
boolean
Default Value:
false
Whether the policy governance is enabled. Defaults to false. -
policyId:
string
Minimum Length:
1
Maximum Length:255
Unique policy identifier.
object
-
isPolicyEnabled:
boolean
Default Value:
false
Whether the image verification policy is enabled. Defaults to false. If set to true, the images will be verified against the policy at runtime. -
keyDetails:
array keyDetails
A list of KMS key details.
array
-
Array of:
object KeyDetails
The properties that define the kms keys used by OKE for Image Signature verification.
object
-
kmsKeyId:
string
Minimum Length:
1
Maximum Length:255
The OCIDs of the KMS key that will be used to verify whether the images are signed by an approved source.
object
-
isKubernetesDashboardEnabled:
boolean
Whether or not to enable the Kubernetes Dashboard add-on.Example:
true
-
isTillerEnabled:
boolean
Whether or not to enable the Tiller add-on.Example:
true
object
-
isPodSecurityPolicyEnabled:
boolean
Default Value:
false
Whether or not to enable the Pod Security Policy admission controller.Example:false
object
-
podsCidr:
string
Default Value:
10.244.0.0/16
The CIDR block for Kubernetes pods. Optional, defaults to 10.244.0.0/16.Example:10.244.0.0/16
-
servicesCidr:
string
Default Value:
10.96.0.0/16
The CIDR block for Kubernetes services. Optional, defaults to 10.96.0.0/16.Example:10.96.0.0/16
object
-
definedTags:
object definedTags
Additional Properties Allowed: additionalPropertiesDefined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
-
freeformTags:
object freeformTags
Additional Properties Allowed: additionalPropertiesFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
object
-
definedTags:
object definedTags
Additional Properties Allowed: additionalPropertiesDefined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
-
freeformTags:
object freeformTags
Additional Properties Allowed: additionalPropertiesFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
array
-
Array of:
string
Example:
ocid1.subnet.oc1.iad.aaaaaaaanifpelnyzmkvnepohbz4ntswkpl35syzzsugdxceth3ofzxtlyit
object
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing a defined tag key and value, scoped to a namespace. Example: `{"CostCenter": "42"}`
{
"Operations":{
"CostCenter":42
}
}
object
{
"Department":"Finance"
}
object
-
object additionalProperties
The value of the tag. Only the String type is supported.
object
object
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing a defined tag key and value, scoped to a namespace. Example: `{"CostCenter": "42"}`
{
"Operations":{
"CostCenter":42
}
}
object
{
"Department":"Finance"
}
object
-
object additionalProperties
The value of the tag. Only the String type is supported.
object
Response
- application/json
202 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
-
opc-work-request-id: string
The OCID of the work request handling the operation.
400 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
401 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
404 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
409 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
429 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
500 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
Default Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.