Kubernetes Deployments Overview
This topic describes the concept of a Harness Kubernetes deployment by describing the high-level steps involved.
For a quick tutorial, see the Kubernetes Quickstart tutorial.
For detailed instructions on using Kubernetes in Harness, see the Kubernetes How-tos.
Before You Begin
Before learning about Harness Kubernetes deployments, you should have an understanding of Harness Key Concepts.
What Does Harness Need Before You Start?
A Harness Kubernetes deployment requires the following:
- Artifact: For example, a Docker image of NGINX from Docker Hub.
- Kubernetes cluster: You will need a target cluster for your application and the Harness Delegate, and your Kubernetes workloads. A Kubernetes Delegate requires at least 8GB RAM, and so your cluster should have enough RAM to host the Delegate and your applications and workloads.
What Does Harness Deploy?
Harness takes the artifacts and Kubernetes manifests you provide and deploys them to the target Kubernetes cluster. You can simply deploy Kubernetes objects via manifests and you can provide manifests using remote sources and Helm charts.
What Does a Harness Kubernetes Deployment Involve?
The following list describes the major steps of a Harness Kubernetes deployment:
Description and Links
Install the Harness Kubernetes Delegate in your Kubernetes cluster.
Typically, the Kubernetes Delegate is installed in the target cluster where you will deploy your application(s).
Add a Harness Artifact Server.
Add a Harness Artifact Server. For example, a Docker Registry Artifact Server that connects to the Docker registry where your Docker images are located, or the public Docker Hub.
Add a Cloud Provider.
A Cloud Provider is a connection to your Kubernetes cluster.
You can add a Kubernetes Cluster Cloud Provider (recommended) or a Cloud Provider for the cloud platform where the cluster is hosted, such as a Google Cloud Platform Cloud Provider. A Kubernetes Cluster Cloud Provider will connect to any cluster on any platform.
In you use a Kubernetes Cluster Cloud Provider, you can use the Delegate installed in your cluster for authentication.
Create the Harness Application for your Kubernetes CD Pipeline.
The Harness Application represents a group of microservices, their deployment pipelines, and all the building blocks for those pipelines. Harness represents your release process using a logical group of one or more entities: Services, Environments, Workflows, Pipelines, Triggers, and Infrastructure Provisioners. Applications organize all of the entities and configurations in Harness CD.
Create the Harness Service using the Kubernetes Deployment Type.
Add your Kubernetes manifests and any config variables and files.
Create the Harness Environment and Infrastructure Definition for your target Kubernetes clusters, and any overrides.
Using the Harness Cloud Provider you set up, you can select the target Kubernetes cluster and namespace for your deployment.
You can also override any Service settings, such as manifest values. This enables you to use a single Service with multiple Harness Environments.
Create the Canary, Blue/Green, or Rollout deployment Harness Workflow.
The Workflow deploys the artifact(s) and Kubernetes workloads defined in the Harness Service to the cluster and namespace in the Harness Infrastructure Definition.
Deploy the Workflow.
Once you've deployed a Workflow, learn how to improve your Kubernetes CD:
Read the following topics to build on what you've learned: