Deploying to a Kubernetes Cluster
Create a pipeline to deploy artifacts to a Container Engine for Kubernetes (OKE) cluster.
Each service in Oracle Cloud Infrastructure (OCI) integrates with Identity and Access Management (IAM) for authentication and authorization. To grant users permission to access the DevOps deployment pipelines and other resources, you have to create dynamic groups and IAM policies.
- Open the navigation menu and click Developer Services. Under DevOps, click Projects.
- Select a project, and a deployment pipeline.
- To add a stage to the pipeline, click the + icon and select Add stage.
- For stage type, select Deploy - OKE, and then click Next.
- Enter a name and description for the stage. Adding a description is optional.
- For Environment, select an existing cluster environment.
- Click Select Artifact, and then select one or more artifact resources from your
The DevOps service performs a Kubernetes server-side apply of the Kubernetes manifest artifacts in the order that they appear in the Console. You can also remove artifacts to select another one or reorder the artifacts list. Removing an artifact in the pipeline stage does not delete the artifact resource from your project. For more information on Kubernetes server-side apply, see Server-Side Apply.
- (Optional) To override the default environment namespace, enter value for Override Kubernetes namespace.
- To automatically roll back to the last successful release version if the validation fails, select Yes. For more information, see Rolling Back a Deployment.
- (Optional) To add tags to the pipeline, 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 it.
To add a defined tag, you must have permissions to use the tag namespace.
For more information, see Resource Tags.
- To add the stage to the pipeline, click Add.
A stage preview provides a snapshot of the configuration.
Add more stages sequentially or in parallel to the pipeline, as needed. To deploy the build output to the target environment, run the deployment pipeline.
To create a Kubernetes cluster stage for the pipeline, run the
oci devops deploy-stage create-deploy-oke-stage
Required parameters for the
To get all the commands for
oci devops deploy-pipeline -h
oci devops deploy-stage -h
To get help for the
oci devops deploy-stage create-deploy-oke-stage -h
To create a Kubernetes cluster stage for the pipeline, use the
CreateDeployStageoperation. For the
deployStageTypeattribute, specify the