Deploy Your First App with Harness CD in Under 15 Minutes
Who this is for: Developers or platform engineers who have never run a Harness CD pipeline before. You'll need an SCM account, a Docker Hub (or similar) account, a Kubernetes cluster that a Harness Delegate can reach, and a Harness account. Once the delegate is connected, everything else in this walkthrough happens inside the Harness platform. The problem with your first deployment Most teams…
This guide is aimed at developers and platform engineers who have never utilized a Harness CD pipeline before. To begin, you will require an SCM account, a Docker Hub account (or an equivalent), a Kubernetes cluster accessible by the Harness Delegate, and a Harness account. Once the delegate is connected, the rest of the process unfolds within the Harness platform.
The challenge with the initial production deployment often mirrors a consistent pattern: SSH access to a container, fetching the latest code via git pull, rebuilding the service, restarting it, and monitoring logs for a brief period to ensure no issues arise. This process typically works, but it becomes problematic when things go awry.
A faulty build may be inadvertently deployed, the running commit becomes unclear, and rollback necessitates recalling the last functioning image tag and repeating the manual procedure under pressure, at an unfavorable time. This scenario usually consumes 15-20 minutes of frantic SSHing, a task that a rollback button should accomplish in mere seconds. This is not a product of tooling failure but rather a lack of necessary layer.
Many teams resort to either hand-rolling the deployment within their CI tool or adopting a dedicated CD tool. The former involves integrating a deploy step into the end of the build job using kubectl apply or a shell script over SSH. This approach suffices for a single service, environment, and individual who comprehends the script.
However, it falls short when multiple environments, rollbacks without re-executing scripts from memory, or approval gates before production are required. The latter entails separating build (CI) from deploy (CD). This means the deployment itself, the targeted environment, the strategy employed, and the actions post-deployment failure are all configured once and reused, rather than being re-implemented in every pipeline's YAML.
While this necessitates slightly more setup initially, it results in rollback, approval, and audit history capabilities that do not need to be built from scratch. Harness CD will be utilized in the upcoming demonstration, deploying a real Java application to a Kubernetes cluster. CD is merely one component of Harness's broader Software Delivery Agent; the same governance and audit trail accessible here also extends to builds, infrastructure, and artifacts, ensuring the pipeline intricately fits into a larger framework rather than functioning as an isolated tool.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.