From f49cc18daf548db635790eacb7919e37fb4ad99a Mon Sep 17 00:00:00 2001 From: Shubham-Patel07 Date: Sat, 22 Jun 2024 14:51:33 +0530 Subject: [PATCH] Add: Added the sealed secrets configration in k8s-vault-minikube-start.sh and changes made in readme --- README.md | 4 ++++ k8s-vault-minkube-start.sh | 3 +++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index cbdb0e047..73fa81f47 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,8 @@ The K8S setup currently is based on using Minikube for local fun. You can use th kubectl apply -f k8s/secrets-secret.yml kubectl apply -f k8s/challenge33.yml kubectl apply -f k8s/secret-challenge-deployment.yml + kubectl apply -f https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.17.4/controller.yaml + kubectl apply -f k8s/sealed-secret-controller.yaml while [[ $(kubectl get pods -l app=secret-challenge -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do echo "waiting for secret-challenge" && sleep 2; done kubectl expose deployment secret-challenge --type=LoadBalancer --port=8080 minikube service secret-challenge @@ -194,6 +196,8 @@ Want to run vanilla on your own k8s? Use the commands below: kubectl apply -f k8s/secrets-secret.yml kubectl apply -f k8s/challenge33.yml kubectl apply -f k8s/secret-challenge-deployment.yml + kubectl apply -f https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.17.4/controller.yaml + kubectl apply -f k8s/sealed-secret-controller.yaml while [[ $(kubectl get pods -l app=secret-challenge -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do echo "waiting for secret-challenge" && sleep 2; done kubectl port-forward \ $(kubectl get pod -l app=secret-challenge -o jsonpath="{.items[0].metadata.name}") \ diff --git a/k8s-vault-minkube-start.sh b/k8s-vault-minkube-start.sh index d6c6423ee..383af37c0 100755 --- a/k8s-vault-minkube-start.sh +++ b/k8s-vault-minkube-start.sh @@ -20,6 +20,9 @@ if [ $? == 0 ]; then else kubectl apply -f k8s/secrets-config.yml fi +# Adding new commands for Sealed Secrets setup +kubectl apply -f https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.17.4/controller.yaml +kubectl apply -f k8s/sealed-secret-controller.yaml kubectl get secrets | grep 'funnystuff' &> /dev/null if [ $? == 0 ]; then