Installation
Keptn must be installed onto each Kubernetes cluster you want to monitor. Additionally, Keptn needs to be enabled on your namespaces. This gives you flexibility in how and where you want to use Keptn.
Note By default, Keptn monitors all namespaces in the cluster except for those reserved for major components. See Namespaces and Keptn to learn how to limit the namespaces that Keptn monitors.
Keptn is installed using Helm.
After you install Keptn, you are ready to Integrate Keptn with your applications.
Supported Kubernetes versions
Keptn requires Kubernetes v1.24.0 or later.
Run the following to ensure that both client and server versions are running Kubernetes versions greater than or equal to v1.24. In this example, both client and server are at v1.24.0 so Keptn will work.
Keptn makes use of a custom scheduler
when running on Kubernetes v1.26 and earlier.
For Kubernetes v1.27 and later, scheduling is
implemented using
Kubernetes scheduling gates,
unless the schedulingGatesEnabled
Helm value is set to false
.
See
Keptn integration with Scheduling
for details.
If Keptn is installed on a vCluster with Kubernetes v1.26 or earlier, some extra configuration needs to be added for full compatibility. See Running Keptn with vCluster for more information.
If you want to deploy Keptn via ArgoCD, refer to the Deploying Keptn via ArgoCD section for more information.
Basic installation
Keptn is installed onto an existing Kubernetes cluster
using a Helm chart.
To modify the Keptn configuration,
you must modify the values.yaml
file of the chart.
The command sequence to fetch and install the latest release of Keptn is:
helm repo add keptn https://charts.lifecycle.keptn.sh
helm repo update
helm upgrade --install keptn keptn/keptn \
-n keptn-system --create-namespace --wait
If you want to use Keptn to observe your deployments
or to enhance them with lifecycle management
you must enable Keptn in your
Namespace
via annotations.
For example, for the testy-test
namespace:
apiVersion: v1
kind: Namespace
metadata:
name: testy-test
annotations:
keptn.sh/lifecycle-toolkit: "enabled" # this tells Keptn to watch the namespace
Some helpful hints:
-
Use the
--version <version>
flag on thehelm upgrade --install
command to specify a different Keptn Helm chart version.To get the appropriate chart version for the Keptn version you want, use the following command:
You see that the "CHART VERSION" for
keptn/keptn
v0.9.0 is 0.3.0 so use the following command to explicitly installs Keptn v0.9.0: -
To view which Keptn components are installed in your cluster and verify that they are the correct ones, run the following command:
The output shows all Keptn components that are running on your cluster.
Alternative installation methods
Install Keptn via Glasskube
Glasskube is a package manager for Keptn that simplifies the installation process and can be used to automatically upgrade Keptn to the latest version. For more information on how to install Glasskube, see Glasskube Installation.
To install Keptn via Glasskube after Glasskube is installed, run the following command:
After that, Keptn is installed on your cluster and will be automatically upgraded to the latest version.
Keptn Helm configuration
The Keptn configuration is controlled by a set of Helm value files, summarized in the following table. The Keptn Helm chart is an umbrella chart that contains subcharts for all components of Keptn. Each component has its own Helm values file (documented in its own README file), that defines configurations specific to that component.
All configuration changes for all components
can be made in one values.yaml
file.
This is discussed more in
Customizing the configuration of components
below.
The following table summarizes the Keptn values.yaml
files.
- The "Component" column leads you to the README files for each component where all Helm values are documented
- The "Configuration file" column leads you to the Helm values files for each component
Component | Used for | Configuration file |
---|---|---|
Keptn | Installs subcharts, global configuration | keptn/values.yaml |
lifecycle-operator | Observability, Release Lifecycle Management | keptn-lifecycle-operator/values.yaml |
metrics-operator | Keptn metrics, Analysis | keptn-metrics-operator/values.yaml |
cert-manager | TLS Certificate management for all Keptn components | keptn-cert-manager/values.yaml |
Customizing the configuration of components
To modify configuration of the subcomponents of Keptn,
use the corresponding Helm values in your values.yaml
file.
Use the subcomponent's parent value as the root for your configuration.
Here is an example values.yaml
altering global and metrics operator values:
global:
# change all installed operator registries
# e.g. the metrics operator image will be localhost:5000/keptn/metrics-operator:v0.0.0
imageRegistry: "localhost:5000"
commonLabels:
app.kubernetes.io/version: myversion # this label will be added to all installed resources
certManager:
enabled: true
lifecycleOperator:
enabled: false # lifecycle operator won't be installed
metricsOperator:
enabled: true
image:
tag: v0.0.0 # metrics operator will use this image tag
imagePullPolicy: Never
Note the additional values that are specified
in the metricsOperator
section.
These are documented in the README file for that operator,
which is linked from the metrics-operator
item under "Component"
in the table above.
To implement this:
- Go into the
values.yaml
file linked under "Configuration file" - Copy the lines for the values you want to modify
- Paste those lines into your
values.yaml
file and modify their values in that file.
Modify Helm values
To modify Helm values:
-
Download a copy of the Helm values file:
-
Edit your local copy to modify some values
-
Add the following string to your
helm upgrade
command to install Keptn with your configuration changes:For example, if you create a
my.values.yaml
and modify some configuration values, use the following command to apply your configuration:helm upgrade --install keptn keptn/keptn \ --values my.values.yaml \ -n keptn-system --create-namespace --wait
You can also use the
--set
flag to specify a value change for thehelm upgrade --install
command. Helm values are specified using the format:
Control what components are installed
By default, all components are included when you install Keptn.
To specify the components that are included,
you need to modify the Keptn values.yaml
file
to disable the components you do not want to install.
Note that the Keptn Helm chart is quite flexible. You can install all Keptn components on your cluster, then modify the configuration to exclude some components and update your installation. Conversely, you can exclude some components when you install Keptn then later add them in.
Disable Keptn Certificate Manager (Certificates)
If you wish to use your custom certificate manager,
you can disable Keptn cert-manager
by setting the
certificateManager.enabled
Helm value to false
:
For more information on using cert-manager
with Keptn, see
Use Keptn with cert-manager.io.
For the full list of Helm values, see the keptn-cert-manager Helm chart README.
Uninstalling Keptn
To uninstall Keptn from your cluster, please follow the steps on the Uninstall page.