Creating a Kubernetes Cluster Environment
Learn how to create a reference to Container Engine for Kubernetes (OKE) cluster target environment.
Using the Console
- Open the navigation menu and click Developer Services. Under DevOps, click Projects.
- Select an existing project, or create a DevOps project.
- Click Create environment.
- For Environment type, select Oracle Kubernetes Engine.
- Enter a name and optional description for the environment.
(Optional) To add tags to the environment, click Show tagging options. Tagging
is a metadata system that lets you organize and track the resources in your tenancy.
If you have permissions to create a resource, you also have permissions to add free-form tags to that resource.
To add a defined tag, you must have permissions to use the tag namespace.
For more information, see Resource Tags.
- Click Next.
- Select the region where the cluster is located.
- Select the compartment in which the cluster is located.
Select an OKE cluster. You can select either a public or a private cluster.
You can configure security rule to allow specific type of traffic. For ingress rule, you must provide the source and source type. The source you provide depends on the source type you choose. Source type can be Classless Inter-Domain Routing (CIDR), Network Security Group, or Service. For information about defining security rules, see Security Rules.
For public endpoints, you can use the Oracle service CIDR labels to restrict OKE API server access to only DevOps service for deployment. Example:
all-phx-services-in-oracle-services-networkis a service CIDR label that represents all the CIDRs for the supported services in the Oracle Services Network in the US West (Phoenix) region. For more information, see Access to Oracle Services.
Private clusters isolate nodes from inbound or outbound public internet connectivity.Note
If you select a private cluster and create the environment reference, then you cannot change to public cluster again.
- If you select a private cluster, then select the VCN and subnet that has network access to the Kubernetes API endpoint such as a node pool's subnet. See Creating a Kubernetes Cluster.
- (Optional) Select a network security group (NSG) . You can add multiple NSGs.
- Click Create environment.
The reference to the Kubernetes cluster environment is created. You can create a deployment pipeline to deploy artifacts to a Container Engine for Kubernetes (OKE) cluster.
Using the CLI
To create a reference to a Kubernetes cluster environment, run the
oci devops deploy-environment create-oke-cluster-environment
Required parameters for the
To get all the commands for
oci devops deploy-environment -h
To get help for the
oci devops deploy-environment create-oke-cluster-environment -h
Using the API
To create a reference to a Kubernetes cluster environment, use the
deployEnvironmentType attribute, specify the