Skip to Content
Technical Articles
Author's profile photo Frank Schuler

Install Gardener on Rancher

Previously, I described how to Prepare your SAP Data Intelligence installation with Rancher. Based on this I have been wondering whether Gardener could add to the equation. Therefore, I install it on Rancher in 5 steps along the Install Gardener on your Kubernetes Landscape guide:

  1. Load Balancer
  2. Vertical Pod Autoscaler
  3. DNS Provider
  4. Ceph CSI
  5. Deploy

Load Balancer

I leverage MetalLB on premise which is easy enough to install choosing the Helm option.

Helm

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

MetalLB

helm repo add metallb https://metallb.github.io/metallb
helm install metallb metallb/metallb -f values.yaml

Example values.yaml

configInline:
  address-pools:
   - name: default
     protocol: layer2
     addresses:
     - 192.168.2.128/32

Vertical Pod Autoscaler

Gardener requires a Vertical Pod Autoscaler that does not come with Gardener but is not difficult to install.

git clone https://github.com/kubernetes/autoscaler.git
cd autoscaler/vertical-pod-autoscaler/
./hack/vpa-up.sh

DNS Provider

Gardener requires External DNS Management for the DNS controller manager artefact. I chose Clouflare DNS service.

DNS controller manager

git clone https://github.com/gardener/external-dns-management.git
cd external-dns-management
helm install charts/external-dns-management --generate-name --namespace=default --set configuration.identifier=garden

Secret

apiVersion: v1
kind: Secret
metadata:
  name: cloudflare-credentials
  namespace: default
type: Opaque
data:
  CLOUDFLARE_API_TOKEN: <Your Cloudflare API token>

DNSProvider

apiVersion: dns.gardener.cloud/v1alpha1
kind: DNSProvider
metadata:
  name: cloudflare
  namespace: default
spec:
  type: cloudflare-dns
  secretRef:
    name: cloudflare-credentials
  domains:
    include:
    # this must be replaced with a (sub)domain of the hosted zone
    - <Your domain>

Ceph CSI

Gardener requires persistent storage so I Provision Volumes on Kubernetes and Nomad using Ceph CSI by Kidong Lee.

Deploy

Given the above, installing Gardener is straight forward.

git clone https://github.com/gardener/sow
cd sow
export PATH=$PATH:$PWD/docker/bin
cd ..
mkdir landscape
cd landscape
cp ~/.kube/config kubeconfig
git clone "https://github.com/gardener/garden-setup" crop
sow order -A
sow deploy -A
sow url

As a result, Gardener is running.

Ready to log into my Gardener Dashboard.

In an upcoming blog I will try to prepare a SAP Data Intelligence installation on Gardener.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.