Previously, I Install Gardener on Rancher, wondering what Gardener might add to Prepare your SAP Data Intelligence installation with Rancher. Coming from Make your SAP Data Hub Distributed Runtime work on the SUSE CaaS Platform, I had been leveraging SUSE Linux Enterprise Server to start with. Lately, I have been having also good experience with Ubuntu though, resulting in some additional optimizations described in this blog along the 5 steps:

  1. Load Balancer
  2. Vertical Pod Autoscaler
  3. DNS Provider
  4. Storage Class
  5. Gardener

Load Balancer

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

Helm Ubuntu optimized

sudo snap install helm --classic

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 still requires a Vertical Pod Autoscaler that does not come with Gardener but it remains 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 continue to choose Clouflare DNS service, but since The DNSProvider resource of type cloudflare-dns is only implemented in gardener/external-dns-management, which currently is a hard dependency of g/g, I continue have to implement it manually. Additionally, I create a test DNSEntry.

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>

DNSEntry

apiVersion: dns.gardener.cloud/v1alpha1
kind: DNSEntry
metadata:
  name: mydnsentry
  namespace: default
spec:
  dnsName: "myentry.architectsap.de"
  ttl: 600
  targets:
  - 192.168.2.128

There is a plan Move DNSProvider capabilities out of g/g though.

Storage Class

Gardener requires persistent storage. Previously, I Provision Volumes on Kubernetes and Nomad using Ceph CSI by Kidong Lee. However, lately I switched to Longhorn, that does not require another proprietary cluster but runs natively on Kubernetes instead and is better integrated with Rancher as well.

kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v1.2.4/deploy/longhorn.yaml
kubectl patch storageclass longhorn -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
kubectl get storageclass

Longhorn appears in my cluster respectively.

From where I can reach the dashboard.

Gardener Ubuntu optimized

Given the above, installing Gardener is straight forward.

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

As a result, Gardener is running and I create a cluster in preparation for my SAP Data Intelligence installation on Gardener.

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x