Prerequisites for using Helm to install CloudBees CI

2 minute read

Before installing, do the following:

Setting up a Kubernetes namespace

CloudBees recommends using Kubernetes namespaces when you install CloudBees CI.

When combined with Kubernetes RBAC security, Kubernetes namespaces help a Kubernetes administrator restrict who has access to a namespace and its data.

To set up a Kubernetes namespace:

  1. Type the following commands:

kubectl create namespace cloudbees-core kubectl config set-context $(kubectl config current-context) --namespace=cloudbees-core

Adding the CloudBees Helm Chart Repository

CloudBees hosts the Helm chart on CloudBees' public Helm Chart Repository. Before you can use the CloudBees repository you must add it to your Helm environment with the helm repo add command.

To add the CloudBees Public Helm Chart Repository to your Helm environment:

helm repo add cloudbees https://public-charts.artifacts.cloudbees.com/repository/public/ (1) helm repo update (2)
1 The helm repo add adds a new Helm Chart Repository to your Helm installation.
2 The helm repo update updates your local Helm Chart Repository cache. Your local Helm Chart Repository cache is used by Helm commands like helm search to improve performance.
Always run helm repo update before you execute a Helm search using helm search. This ensures your cache is up to date.

Creating an NGINX Ingress Controller

  1. Create a file values.yaml with the following content, assuming cloudbees-core is the namespace where CloudBees CI is deployed:

    controller: ingressClass: "nginx" service: externalTrafficPolicy: "Local"
  2. Deploy the configuration:

    helm repo add ingress-nginx \https://kubernetes.github.io/ingress-nginx helm repo update helm upgrade ingress-nginx \ ingress-nginx/ingress-nginx \ --install \ --namespace ingress-nginx \ --values values.yaml \ --version 3.3.0

Creating a DNS record

Create a DNS record for the domain you want to use for CloudBees CI, pointing to your NGINX Ingress Controller load balancer.

You can retrieve the IP of the load balancer using

kubectl get -n ingress-nginx services ingress-nginx-controller --output jsonpath='{.status.loadBalancer.ingress[0].ip}'