This page provides an overview of available methods to install CAP Operator on a Kubernetes cluster.
This is the multi-page printable view of this section. Click here to print.
Installation
1 - Prerequisites
We recommend using a “Gardener” managed cluster to deploy CAP applications managed with CAP Operator.
Set up the following prerequisites in the Kubernetes cluster before installing CAP Operator:
Istio (version >= 1.22)
Istio service mesh is used for HTTP traffic management. CAP Operator creates Istio resources to manage incoming HTTP requests to the application and to route requests on specific (tenant) subdomains.
Determine the public ingress Gateway subdomain and the overall shoot domain for the system, and specify them in the chart values. See here for an example.
Note: Istio promoted many of its APIs to v1 in the 1.22 release. As of CAP Operator release v0.11.0, Istio version >= 1.22 is therefore a prerequisite.
sap-btp-service-operator or cf-service-operator
These operators can be used for managing SAP BTP service instances and service bindings from within the Kubernetes cluster.
If some SAP BTP services are not available for Kubernetes platforms, you can use cf-service-operator, which creates the services for a Cloud Foundry space and inserts the required access credentials as Secrets into the Kubernetes cluster.
Service credentials added as Kubernetes Secrets by these operators support additional metadata. If you don’t use this feature, set
secretKey: credentialsin the spec to ensure that service credentials retain JSON data as-is. We recommend usingsecretKeyeven when credential metadata is available, to reduce the overhead of parsing multiple JSON attributes.
“Gardener” certificate management
This component is available in “Gardener” managed clusters and is used to manage TLS certificates and issuers. Alternatively, you can use cert-manager.io cert-manager.
2 - Using Helm
To install CAP Operator components, use the Helm chart published as an OCI package at oci://ghcr.io/sap/cap-operator-lifecycle/helm/cap-operator.
Installation
Create a namespace and install the Helm chart in that namespace by specifying the domain and dnsTarget for your subscription server, either:
As command line parameters:
kubectl create namespace cap-operator-system helm upgrade -i -n cap-operator-system cap-operator oci://ghcr.io/sap/cap-operator-lifecycle/helm/cap-operator --set subscriptionServer.domain=cap-operator.<CLUSTER-DOMAIN> --set subscriptionServer.dnsTarget=public-ingress.<CLUSTER-DOMAIN>As a
YAMLvalues file:kubectl create namespace cap-operator-system helm upgrade -i -n cap-operator-system cap-operator oci://ghcr.io/sap/cap-operator-lifecycle/helm/cap-operator -f my-cap-operator-values.yamlThe values file
my-cap-operator-values.yamlcan have the following content:subscriptionServer: dnsTarget: public-ingress.<CLUSTER-DOMAIN> domain: cap-operator.<CLUSTER-DOMAIN>
Optional steps
Enable Service Monitors for metrics
To enable monitoring via metrics emitted by CAP Operator components, set the following value:
monitoring: enabled: true # <-- enables creation of service monitors for metrics emitted by CAP Operator componentsTo enable detailed operational metrics for the controller:
controller: detailedOperationalMetrics: trueSet up Prometheus integration for Version Monitoring
To use the Version Monitoring feature, provide a Prometheus server URL to the CAP Operator. When installing with the Helm chart, specify the following values:
controller: versionMonitoring: prometheusAddress: "http://prometheus-operated.monitoring.svc.cluster.local:9090" # <-- example of a Prometheus server running inside the same cluster promClientAcquireRetryDelay: "2h" metricsEvaluationInterval: "30m" # <-- interval at which version metrics are evaluatedOn startup, the controller attempts to connect to the Prometheus server and fetch runtime information to verify the connection. If the connection fails, it retries after the delay specified in
controller.versionMonitoring.promClientAcquireRetryDelay. See default values here.Note- When connecting the controller to a Prometheus server running inside the cluster, ensure that the
NetworkPoliciesrequired for connecting to the service in the Prometheus namespace are also created. - If the Prometheus service is configured to use TLS, mount the relevant CA root certificates as volumes to the controller.
- When connecting the controller to a Prometheus server running inside the cluster, ensure that the
2.1 - Helm Values
3 - Using CAP Operator Manager
To install the CAP Operator using CAP Operator Manager, run the following command:
kubectl apply -f https://github.com/SAP/cap-operator-lifecycle/releases/latest/download/manager_manifest.yaml
This creates the cap-operator-system namespace with CAP Operator Manager installed. Once the CAP Operator Manager pod is running, install the CAP Operator by running:
kubectl apply -n cap-operator-system -f https://github.com/SAP/cap-operator-lifecycle/releases/latest/download/manager_default_CR.yaml
This works only if the ingressGatewayLabels in your cluster match the following values:
ingressGatewayLabels:
- name: istio
value: ingressgateway
- name: app
value: istio-ingressgateway
If not, you must create the CAPOperator resource manually. For details, see the documentation.
4 - Kyma Cluster
See installation steps here: https://sap.github.io/cap-operator-lifecycle/docs/installation/kyma-cluster/