This repository entails a simple demonstration application and helm chart.
Demonstration details are towards:
- Deploying this application through ArgoCD (See below for deployment details)
- Demonstrating environment specific Helm values where each environment has a separate values file.
- Use of configmaps via a Helm chart dependency for separation of concern and standardization.
- Use of SealedSecrets via a Helm chart dependency for encrypted secrets, separation of concern and standardization. For implementation details see pull
- Kubernetes RBAC policy illustration.
- A kubernetes cluster, local testing is recommended for ease of use. Docker Desktop or any other preferred tool can serve.
- Install the following list of packages, although MacOS specific, at least Linux flavors are guaranteed.
brew install kubeseal argocd helm(v3+)
- Install the following Helm repositories:
helm repo add sealed-secrets https://bitnami-labs.github.io/sealed-secrets
helm repo add k8s-as-helm https://ameijer.github.io/k8s-as-helm
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update # ensure these are up to date
- Create the following namespaces (one at a time or output this to a local yaml/json file for ease), feel free to adjust these but ensure your value files are aligned otherwise there would be confict. ArgoCD can create namespaces that don't exist but for consistency's sake, these should do.
kubectl create namespace argocd development production
- Install ArgoCD:
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
- Install the sealed secrets controller:
helm install sealed-secrets-controller --namespace kube-system --version 2.6.5 sealed-secrets/sealed-secrets
- Retrieve the ArgoCD admin password:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
- Port forward the argoCD endpoint to a local port
kubectl port-forward svc/argocd-server -n argocd 8083:443
- From
http://localhost:8083/
login with the credentials from step #7 - Once you are logged in, create a new app and use the details on the screenshot below to resemble my deployment:
- Under the Directory dropdown, select Helm and pass the development values file.
- You can create as many applications as you have environments. For this illustration 2 will do,