In this tutorial we are going to learn how to install Keptn in your Kubernetes cluster running in Elastic Kubernetes Services (EKS) in AWS.
Please download and install the following tools if you do not have them installed on your machine already.
We are going to setup a Kubernetes cluster in EKS.
eksctl
.m5.2xlarge
node. Please note that you might go for a smaller or larger size cluster depending on the concrete use case. The suggested sizing is based on the recommendation for the full tour tutorials.eksctl create cluster --version=1.17 --name=keptn-cluster --node-type=m5.2xlarge --nodes=1 --region=eu-west-3
Find a full compatibility matrix for supported Kubernetes versions here.
Every release of Keptn provides binaries for the Keptn CLI. These binaries are available for Linux, macOS, and Windows.
There are multiple options how to get the Keptn CLI on your machine.
curl -sL https://get.keptn.sh | sudo -E bash
This will download and install the Keptn CLI automatically.keptn
binary in the unpacked directorychmod +x keptn
), and move it to the desired destination (e.g. mv keptn /usr/local/bin/keptn
)Now, you should be able to run the Keptn CLI:
keptn --help
.\keptn.exe --help
To install the latest release of Keptn with full quality gate + continuous delivery capabilities in your Kubernetes cluster, execute the keptn install
command.
keptn install --endpoint-service-type=ClusterIP --use-case=continuous-delivery
In the Keptn namespace, the following deployments should be found:
kubectl get deployments -n keptn
Here is the output of the command:
NAME READY UP-TO-DATE AVAILABLE AGE
api-gateway-nginx 1/1 1 1 2m44s
api-service 1/1 1 1 2m44s
bridge 1/1 1 1 2m44s
configuration-service 1/1 1 1 2m44s
eventbroker-go 1/1 1 1 2m44s
gatekeeper-service 1/1 1 1 2m44s
helm-service 1/1 1 1 2m44s
helm-service-continuous-deployment-distributor 1/1 1 1 2m44s
jmeter-service 1/1 1 1 2m44s
lighthouse-service 1/1 1 1 2m44s
mongodb 1/1 1 1 2m44s
mongodb-datastore 1/1 1 1 2m44s
remediation-service 1/1 1 1 2m44s
shipyard-service 1/1 1 1 2m44s
Expose the Keptn endpoint via the following command to be able to access on localhost. Please note that the port-forward must be kept open for the next commands to succeed, therefore we recommend doing this in a separate terminal.
kubectl -n keptn port-forward service/api-gateway-nginx 8080:80
Set the following variables to make it easy to connect to Keptn.
KEPTN_ENDPOINT=http://localhost:8080/api
KEPTN_API_TOKEN=$(kubectl get secret keptn-api-token -n keptn -ojsonpath='{.data.keptn-api-token}' | base64 --decode)
To authenticate the CLI against the Keptn cluster, use the keptn auth command:
keptn auth --endpoint=$KEPTN_ENDPOINT --api-token=$KEPTN_API_TOKEN
Starting to authenticate
Successfully authenticated
Now that you have installed Keptn you can take a look at its user interface aka the Keptn's Bridge.
Open a browser and navigate to http://localhost:8080 to take look. The bridge will be empty at this point but when using Keptn it will be populated with events.
If asked for credentials, you can get them by executing the following command.
keptn configure bridge --output
Besides the Keptn's Bridge, please consider also taking a look at the Keptn API endpoint if you are interested to interact with Keptn via the API. Keptn comes with a fully documented swagger-API that can be found under the /api
endpoint.
Now that you have successfully installed Keptn, you can explore other tutorials!
Here are some possibilities: