Deploy an application to Kubernetes.
To use this step, the application should already be deployed in the Kubernetes cluster. This step will re-deploy your existing service.
The display name of the step.
The type of the Microtica built-in step. Should always be deploy for this type of step.
Should always be kubernetes for this type of step.
The name of the existing Kubernetes cluster.
Deploy the application in a specific namespace. Default: microtica
The name of the existing application to be deployed.
Docker image tag to be applied with the deployment. Default: latest
If specified, deployment will be executed only if the pipeline was triggered by push on the matched branch. Otherwise, deployment will be triggered on every pipeline execution.
We assume that application with name my-app is already being deployed in the Kubernetes cluster with name my-cluster. You can read more about how to create and deploy applications here.
In the following example we deploy a application on Kubernetes with an image tag that’s previously been built and pushed to a remote Docker registry.
To dynamically deploy the image that’s just been built, we use MIC_PIPELINE_EXECUTION_ID as a reference value while pushing the image on a remote Docker registry and use the same value when deploying the application.
To trigger a deploy only if the pipeline was triggered by push on a specific branch, we can use the branch_filter parameter to achieve that.
Basically, if you specify develop as a value, the deployment will be triggered only if push was made on the develop branch.
If branch_filter is not specified, deploy will be triggered on each pipeline execution.