openshift-multicluster
openshift-multicluster copied to clipboard
Homelab OpenShift Cluster - Deployed on Proxmox and Operated through Kustomize & ArgoCD
OpenShift Multi-cluster IaC
... managed by ArgoCD :robot:
:wave: Overview
Welcome to my OpenShift multi cluster Infrastructure as code repository
Installing OpenShift cluster with Agent-based Installer
Getting started on Agent-based installer
Manual Steps
-
Generate ISO
rm -rf installer/dev-acm #remove older cluster if any cp -r installer/cluster installer/dev-acm #copy cluster config files ./openshift-install agent create image --dir installer/dev-acm #create image -
Upload ISO to proxmox from GUI
-
Create 3 VMs with CPU type as
max -
Start VMs and wait for the cluster installation to finish
export KUBECONFIG=installer/dev-acm/auth/kubeconfig ./openshift-install agent wait-for install-complete --dir installer/dev-acm --log-level=debug
Automation
Playbooks to automate manual steps described above
GitOps
OpenShift GitOps Operator watches my cluster folder (see Directories below) and makes the changes to my cluster based on the YAML manifests.
oc apply -k kustomize/bases/openshift-gitops-operator
cat ~/.config/sops/age/keys.txt | oc create secret generic sops-age -n openshift-gitops --from-file=keys.txt=/dev/stdin
oc apply -k kustomize/bases/openshift-gitops-config -n openshift-gitops
kustomize build kustomize/cluster-overlays/dev-acm/argo-application --enable-alpha-plugins --load-restrictor LoadRestrictionsNone | oc apply -f-
Folder Layout
This Git repository contains the following directories (kustomizatons) under cluster.
📁 helm # helm charts folder
├─📁 charts
├ └─ 📁 <CHART-NAME> # custom helm charts
📁 kustomize # openshift cluster defined as code
├─📁 bases # bases contains resources that applies to all clusters
└─📁 cluster-overlays # Contains all the clusters managed by the repo
└─ 📁 <CLUSTER-NAME> # Contains applications to deploy on cluster, using helm/charts or kustomize/bases as resources
Deploy Developer Hub
helm upgrade --install developer-hub openshift-helm-charts/redhat-developer-hub -f kustomize/cluster-overlays/dev-acm/developer-hub-chart/values.yaml -n=developer-hub --kube-insecure-skip-tls-verify
🔍 Features
- [x] ArgoCD with SOPS plugin
- [x] Secret Management using External secrets and 1Password
- [x] Cert manager for API and Wildcard certificate
- [x] Multi cluster management
- [x] Kyverno
- [x] Renovate bot