Learn how to get Keptn running in five minutes. Whether you prefer Helm, Docker or Keptn CLI, or k3d, we have you covered.
This Quick Start guide shows how to quickly create a local Keptn installation that runs either as a Helm chart in Kubernetes or as Docker container in K3d and run some exercises to demonstrate Keptn functionality.
You can install and run Keptn on virtually any Kubernetes cluster. See Install CLI and Keptn for detailed instructions about creating a Keptn cluster locally or in the cloud.
1) Install core control plane components and expose via a LoadBalancer:
helm repo add keptn https://charts.keptn.sh && helm repo update
helm install keptn keptn/keptn \
-n keptn --create-namespace \
--wait \
--set=control-plane.apiGatewayNginx.type=LoadBalancer
2) Install the execution plane components. These are additional microservices that will handle certain tasks:
helm install jmeter-service keptn/jmeter-service -n keptn
helm install helm-service keptn/helm-service -n keptn
Now try the Multi-Stage Delivery example and then Auto-Remediation (see below).
Run the Keptn Hello, World! example:
docker run --rm -it \
--name thekindkeptn \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--add-host=host.docker.internal:host-gateway \
gardnera/thekindkeptn:0.0.14
The Keptn Bridge (UI) will be available on http://localhost
The command above has:
keptn
CLIhelloworld
projecthello
Keptn sequenceYou can also run additional hello
sequences with: keptn trigger sequence --sequence hello --project helloworld --service demoservice --stage demo
Now try the Multi-Stage Delivery example and then Auto-Remediation (see below).
1) Download the Keptn Command Line Tool:
curl -sL https://get.keptn.sh | bash
2) Install Keptn core control plane and execution plane services for continuous delivery using the CLI:
keptn install -n keptn --use-case=continuous-delivery --endpoint-service-type=LoadBalancer
Use this method if you don’t have Docker and either have or don’t mind installing k3d.
This quickstart is designed for Linux-based systems. Consequently, use Linux, macOS, or Windows subsystem for Linux v2 with a full virtual machine (WSL2). Note that this tutorial has not been fully verified on non-amd64 architectures (including Arm-based Apple M1).
The following tools need to be installed for this tutorial:
>= 1.19
>= 3.3.0
- Installation Guide4.4.4
All executables should be configured to be executable in the user space without sudo
or equivalents.
If you already have k3d
installed, you can check its version by running k3d --version
.
This tutorial targets version 4.4.4
and may not work properly with older or newer versions.
curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh | TAG=v4.4.4 bash
Start a k3d cluster for Keptn
k3d cluster create mykeptn -p "8082:80@loadbalancer" --k3s-server-arg "--kube-proxy-arg=conntrack-max-per-core=0" --k3s-agent-arg "--kube-proxy-arg=conntrack-max-per-core=0" --agents 1
Download and install the Keptn CLI
curl -sL https://get.keptn.sh | bash
Install Keptn control-plane and execution-plane for continuous delivery use case or use the helm install
version mentioned below.
keptn install --use-case=continuous-delivery
Keptn comes with different installation options, please have a look at the installation documentation for more details on cluster requirements, resource consumption, supported Kubernetes versions, and more. Please note that although during the installation procedure it might be mentioned that Istio is required, it is not required for this quickstart guide.
The installation logs will print the following output:
Installation logs
Installing Keptn …
Helm Chart used for Keptn installation: https://charts.keptn.sh/packages/keptn-0.14.1.tgz
Start upgrading Helm Chart keptn in namespace keptn
Finished upgrading Helm Chart keptn in namespace keptn
Keptn control plane has been successfully set up on your cluster.
Installing execution plane services for continuous-delivery use case.
Start upgrading Helm Chart helm-service in namespace keptn
Finished upgrading Helm Chart helm-service in namespace keptn
Start upgrading Helm Chart jmeter-service in namespace keptn
Finished upgrading Helm Chart jmeter-service in namespace keptn
—————————————————
* To quickly access Keptn, you can use a port-forward and then authenticate your Keptn CLI:
- kubectl -n keptn port-forward service/api-gateway-nginx 8080:80
- keptn auth –endpoint=http://localhost:8080/api –api-token=$(kubectl get secret keptn-api-token -n keptn -ojsonpath={.data.keptn-api-token} | base64 –decode)
* Alternatively, follow the instructions provided at: https://keptn.sh/docs/0.14.x/operate/install/#authenticate-keptn-cli
* To expose Keptn on a public endpoint, please continue with the installation guidelines provided at:
- https://keptn.sh/docs/0.14.x/operate/install#install-keptn
There is no need to follow the instructions from the installation log - the quickstart guide will cover this!
Configure Ingress and authenticate Keptn CLI
curl -SL https://raw.githubusercontent.com/keptn/examples/master/quickstart/expose-keptn.sh | bash
Access Bridge: you can now access the Keptn Web UI at http://127.0.0.1.nip.io:8082/bridge
.
For different way on how to expose your Keptn installation, please refer to https://keptn.sh/docs/0.14.x/operate/install/#install-keptn.
Perform a multi-stage delivery with SLO-based quality gates in place.
Please note this will create a local repository examples/
in your current directory.
Make sure to run it from a directory you are fine having the examples stored in.
curl -SL https://raw.githubusercontent.com/keptn/examples/master/quickstart/multistage-delivery.sh | bash
In Keptn you’ll see one successful quality gate evaluation and one failed evaluation, that means a slow build will never reach production!
What you’ll see
Run automated operations with auto-remediation in action:
curl -SL https://raw.githubusercontent.com/keptn/examples/master/quickstart/automated-operations.sh | bash
In Keptn you’ll see an executed remediation sequence in response to a problem event that has been sent to Keptn!
What you’ll see
Now you have a running Keptn instance, keep exploring it! Please have a look at our tutorials and documentation to learn how you can use Keptn.
With Keptn installed, have a look at the different tutorials to learn hands-on about the Keptn use cases:
A full tour through Keptn: Continuous Delivery & Automated Operations Learn how to setup Keptn for a sample cloud native app where Keptn deploys, tests, validates, promotes and auto-remediates |
|||||
Continuous Delivery with Deployment Validation Keptn deploys, tests, validates and promotes your artifacts across a multi-stage delivery process |
Automated Operations Keptn automates problem remediation in production through self-healing and runbook automation |
||||
Performance as a Self-Service Keptn deploys, tests and provides automated performance feedback of your artifacts |
Performance Testing as a Self-Service Let Keptn execute performance tests against your deployed software and provide automatic SLI/SLO based feedback |
Deployment Validation (aka Quality Gates) Integrate Keptn into your existing CI/CD by automatically validating your monitored environment based on SLIs/SLOs |
Review the documentation for a full reference on all Keptn capabilities and components and how they can be combined/extended to your needs:
If you are finished exploring Keptn, you can always stop and start the cluster and delete it eventually.
k3d cluster stop mykeptn
k3d cluster start mykeptn
Or delete it if you don’t need it anymore
k3d cluster delete mykeptn
In case keptn install
prevents you from installing Keptn due to a (currently) unsupported Kubernetes version, you can bypass this check at your own risk by using the Helm installation option of Keptn.
helm install keptn https://github.com/keptn/keptn/releases/download/0.14.1/keptn-0.14.1.tgz -n keptn --create-namespace --set=continuous-delivery.enabled=true --wait
helm install helm-service https://github.com/keptn/keptn/releases/download/0.14.1/helm-service-0.14.1.tgz -n keptn --create-namespace --wait
helm install jmeter-service https://github.com/keptn/keptn/releases/download/0.14.1/jmeter-service-0.14.1.tgz -n keptn --create-namespace --wait
Now continue with step 4 from the quickstart guide.
If the installation of Keptn is timing out, you can check if the root cause are low resources, such as disk space, by executing kubectl describe pod PODID -n keptn
.executing
Please ensure that your local k3d environment has enough resources. You can verify this in your Docker resource settings. This quickstart guide has been tested with the following configuration:
Resources
Please make sure your Docker environment has been granted enough resources to run k3d and Keptn on top of it.
This quickstart guide has been tested with the following configuration:
Resources
Join our slack channel for any questions that may arise.
There is a special #help
channel for Keptn users when you can get help from the Keptn team.