Home / Docs / Develop / Operate Keptn / Install CLI and Keptn
Select one of the following options:
Install local tools Make sure you are logged in to your Azure account with Create AKS clusterAzure Kubernetes Service (AKS)
az login
1.15.x
(tested version: 1.15.10
)
Install local tools Create EKS cluster on AWS Please note that for EKS version Amazon Elastic Kubernetes Service (EKS)
1.15
(tested version: 1.15
)m5.2xlarge
nodeeksctl create cluster --version=1.15 --name=keptn-cluster --node-type=m5.2xlarge --nodes=1 --region=eu-west-3
Known bug in EKS 1.13
1.13
in our testing we learned that the default CoreDNS that comes with certain EKS versions has a bug. In order to solve that issue we can use eksctl to update the CoreDNS service like this:eksctl utils update-coredns --name=keptn-cluster --region=eu-west-3 --approve
Run your Keptn installation for free on GKE!
If you sign up for a Google Cloud account, Google gives you an initial $300 credit. For deploying Keptn you can apply for an additional $200 credit which you can use towards that GKE cluster needed to run Keptn. Install local tools Create GKE clusterGoogle Kubernetes Engine (GKE)
Apply for your credit here
1.15.x
(tested version: 1.15.9-gke.22
)Ubuntu
or COS
(Note: If you plan to use Dynatrace monitoring, select ubuntu
for a more convenient setup.)// set environment variables
PROJECT=nameofgcloudproject
CLUSTER_NAME=nameofcluster
ZONE=us-central1-a
REGION=us-central1
GKE_VERSION="1.15"
gcloud container clusters create $CLUSTER_NAME --project $PROJECT --zone $ZONE --no-enable-basic-auth --cluster-version $GKE_VERSION --machine-type "n1-standard-8" --image-type "UBUNTU" --disk-type "pd-standard" --disk-size "100" --metadata disable-legacy-endpoints=true --scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" --num-nodes "1" --enable-stackdriver-kubernetes --no-enable-ip-alias --network "projects/$PROJECT/global/networks/default" --subnetwork "projects/$PROJECT/regions/$REGION/subnetworks/default" --addons HorizontalPodAutoscaling,HttpLoadBalancing --no-enable-autoupgrade
Please note that you have to bring your own OpenShift cluster in version 3.11 Install local tools On the OpenShift master node, execute the following steps:OpenShift 3.11
oc adm policy --as system:admin add-cluster-role-to-user cluster-admin <OPENSHIFT_USER_NAME>
oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:default:default
oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:kube-system:default
sudo -i
cp -n /etc/origin/master/master-config.yaml /etc/origin/master/master-config.yaml.backup
oc ex config patch /etc/origin/master/master-config.yaml --type=merge -p '{
"admissionConfig": {
"pluginConfig": {
"ValidatingAdmissionWebhook": {
"configuration": {
"apiVersion": "apiserver.config.k8s.io/v1alpha1",
"kind": "WebhookAdmission",
"kubeConfigFile": "/dev/null"
}
},
"MutatingAdmissionWebhook": {
"configuration": {
"apiVersion": "apiserver.config.k8s.io/v1alpha1",
"kind": "WebhookAdmission",
"kubeConfigFile": "/dev/null"
}
}
}
}
}' >/etc/origin/master/master-config.yaml.patched
if [ $? == 0 ]; then
mv -f /etc/origin/master/master-config.yaml.patched /etc/origin/master/master-config.yaml
/usr/local/bin/master-restart api && /usr/local/bin/master-restart controllers
else
exit
fi
Install local tools Create PKS cluster on GCP Use the provided instructions for Enterprise Pivotal Container Service (Enterprise PKS) installation on GCP Create a PKS cluster by using the PKS CLI and executing the following command:Pivotal Container Service (PKS)
// set environment variables
CLUSTER_NAME=name_of_cluster
HOST_NAME=host_name
PLAN=small
pks create-cluster $CLUSTER_NAME --external-hostname $HOST_NAME --plan $PLAN
Note: Please refer to the official homepage of K3s for detailed installation instructions. Within
this page we only provide a very short guide on how we run Keptn on K3s. Download, install K3s (tested with versions 1.16 to 1.18) and run K3s using the following command: This installs version Export the Kubernetes profile using Verify that the connection to the cluster worksK3s
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.18.3+k3s1 K3S_KUBECONFIG_MODE="644" sh -s - --no-deploy=traefik
v1.18.3+k3s1
(please refer to the K3s GitHub releases page for newer releases), sets file permissions 644
on /etc/rancher/k3s/k3s.yaml
and disables traefik
as an ingress controller.export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
kubectl get nodes
Download and install Minikube (tested with versions 1.3 to 1.10). Create a new Minikube profile (named keptn) with at least 6 CPU cores and 12 GB memory using: (Optional) Start the Minikube LoadBalancer service in a second terminal by executing:Minikube
minikube start -p keptn --cpus 6 --memory 12200
minikube tunnel
Every release of Keptn provides binaries for the Keptn CLI. These binaries are available for Linux, macOS, and Windows.
Find the keptn
binary in the unpacked directory
Linux / macOS: Add executable permissions (chmod +x keptn
), and move it to the desired destination (e.g. mv keptn /usr/local/bin/keptn
)
Windows: Copy the executable to the desired folder and add the executable to your PATH environment variable.
Now, you should be able to run the Keptn CLI:
Linux / macOS
keptn --help
Windows
.\keptn.exe --help
Note: For the rest of the documentation we will stick to the Linux / macOS version of the commands.
To install the latest release of Keptn on a Kuberntes cluster, execute the keptn install command with the platform
flag specifying the target platform you would like to install Keptn on. Currently, supported platforms are:
keptn install --platform=aks
keptn install --platform=eks
keptn install --platform=gke
keptn install --platform=openshift
keptn install --platform=pks
K3s:
Note: If the Keptn installer is having trouble getting an IP address, try to install with --gateway=NodePort
.
keptn install --platform=kubernetes
Minikube:
Note: If you are using minikube tunnel
you don’t need to use --gateway=NodePort
.
keptn install --platform=kubernetes --gateway=NodePort
In the Kubernetes cluster, this command creates the keptn, keptn-datastore, and istio-system namespace. While istio-system contains all Istio related resources, keptn and keptn-datastore contain the complete infrastructure to run Keptn.
The keptn and keptn-datastore namespace contain:
Note: If you want to install Keptn just for the use case of Keptn Quality Gates, you have the option to roll-out Keptn without components for automated delivery and operations. Therefore, the use-case
flag must be set to quality-gates
:
keptn install --platform=[aks|eks|gke|openshift|pks|kubernetes] --use-case=quality-gates
If you have a custom domain or cannot use xip.io (e.g., when running Keptn on EKS with an ELB (Elastic Load Balancer) from AWS), there is the CLI command keptn configure domain to configure Keptn for your custom domain:
keptn configure domain YOUR_DOMAIN
Please note that in case of any errors, the install process might leave some files in an inconsistent state. Therefore keptn install cannot be executed a second time without keptn uninstall. To address a unsuccessful installation:
Uninstall Keptn by executing the keptn uninstall command before conducting a re-installation.