Disclaimer: This project sets up a Gardener landscape on a GKE cluster. This is by no means a productive setup!
- Kubernetes cluster
- Domain/Zone in CloudDNS
- GCP serviceaccount
- terraform
- jq
- cfssl
- openssl
- kubectl
- helm
First we need to clone and configure our setup
git clone https://github.com/afritzler/gardener-gke.git
cd gardener-gke
cp setup.yaml.example setup.yaml
You will need a kubeconfig
with basic-auth user authentication.
export KUBECONFIG=/tmp/kubeconfig
gcloud container clusters get-credentials CLUSTER_NAME --zone europe-west1-b --project PROJECT_NAME
src/bin/convertkubeconfig
Then, edit the setup.yaml
accordingly.
Deploy the Etcd needed by the Gardener extension API server
src/etcd/deploy
src/ingress-controller/deploy
Deploy the Gardener extension API server and controller
src/gardener/deploy
Deploy and configure CloudProfile, Seed, etc ...
src/gardenconfig/deploy
Delete the created shoot cluster (a simple kubectl delete shoot NAME is not allowed in order to prevent users from accidentally deleting their clusters – instead, they need to confirm upfront that the deletion is fine by annotating the shoot resource. You can use this script to do that: https://github.com/gardener/gardener/blob/master/hack/delete (./hack/delete shoot gcp-test garden-core)).
To do it the manual way
kubectl -n garden-core annotate shoot gcp-test confirmation.garden.sapcloud.io/deletion=true --overwrite
kubectl -n garden-core delete shoot gcp-test
helm delete --purge gardenconfig
helm delete --purge gardener
helm delete --purge garden-etcd
helm delete --purge nginx-ingress-controller
# to delete the DNS record
./src/ingress-controller/destroy