In this tutorial we are going to learn how to install Keptn in your OpenShift cluster.
Please download and install the following tools if you do not have them installed on your machine already.
oc
CLI to your OpenShift cluster.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
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 in your OpenShift cluster, execute the keptn install
command with the platform
flag specifying the target platform you would like to install Keptn on.
keptn install --platform=openshift
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.
Now that you have installed Keptn you can take a look at its user interface aka the Keptn's Bridge.
Expose the bridge via the following command to be able to access on localhost:
kubectl port-forward svc/bridge -n keptn 9000:8080
Open a browser and navigate to http://localhost:9000 to take look. The bridge will be empty at this point but when using Keptn it will be populated with events.
Now that you have successfully installed Keptn, you can explore other tutorials!
Here are some possibilities: