From 2aba4ee1bc023793179b03829fd5184db29cc75d Mon Sep 17 00:00:00 2001 From: Russell Trow Date: Thu, 13 Jun 2019 11:42:35 +0100 Subject: [PATCH 1/6] Updated the paths of the Kubernetes Ingress manifests --- workshop-functions.sh | 44 +++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/workshop-functions.sh b/workshop-functions.sh index 0b18731..442c517 100644 --- a/workshop-functions.sh +++ b/workshop-functions.sh @@ -96,14 +96,14 @@ namespace() { : ${workshopNamespace:? required} kubectl create ns ${namespace} - kubectl label ns ${namespace} user=${namespace} + kubectl label ns ${namespace} user=${namespace} assign-role-to-ns ${namespace} | kubectl create -f - kubectl create clusterrolebinding crb-${namespace} --clusterrole=lister --serviceaccount=${workshopNamespace}:sa-${namespace} - kubectl label clusterrolebinding crb-${namespace} user=${namespace} + kubectl label clusterrolebinding crb-${namespace} user=${namespace} kubectl create clusterrolebinding crb-cc-${namespace} --clusterrole=common-config --serviceaccount=${workshopNamespace}:sa-${namespace} - kubectl label clusterrolebinding crb-cc-${namespace} user=${namespace} - + kubectl label clusterrolebinding crb-cc-${namespace} user=${namespace} + } enable-namespaces() { @@ -114,7 +114,7 @@ enable-namespaces() { kubectl config set-context $(kubectl config current-context) --namespace=default kubectl apply -f https://raw.githubusercontent.com/lalyos/k8s-ns-admission/master/deploy-webhook-job.yaml kubectl config set-context $(kubectl config current-context) --namespace=${origns} - fi + fi kubectl patch clusterrole lister --patch='{"rules":[{"apiGroups":[""],"resources":["nodes","namespaces"],"verbs":["*"]}]}' } @@ -166,7 +166,7 @@ spec: - name: NS value: ${name} - name: TILLER_NAMESPACE - value: ${name} + value: ${name} - name: NODE valueFrom: fieldRef: @@ -181,7 +181,7 @@ spec: name: dev volumeMounts: - mountPath: /root/workshop - name: gitrepo + name: gitrepo --- apiVersion: v1 kind: Service @@ -206,7 +206,7 @@ metadata: nginx.org/websocket-services: ${name} labels: user: "${namespace}" - name: ${name} + name: ${name} spec: rules: - host: ${name}.${domain} @@ -222,7 +222,7 @@ dev() { declare namespace=${1} : ${namespace:? required} : ${workshopNamespace:? required} - + namespace ${namespace} namespace ${namespace}play kubectl create rolebinding crb-${namespace}-x \ @@ -230,10 +230,10 @@ dev() { --namespace=${namespace}play \ --serviceaccount=${workshopNamespace}:sa-${namespace} - depl ${namespace}| kubectl create -f - + depl ${namespace}| kubectl create -f - wait-for-deployment ${namespace} - get-url ${namespace} + get-url ${namespace} } presenter() { @@ -250,7 +250,7 @@ presenter-url() { kubectl expose deployment user0 --port 8888 --type=NodePort --name presenter fi - externalip=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type == "ExternalIP")].address}') + externalip=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type == "ExternalIP")].address}') kubectl get svc presenter -o jsonpath="open http://${externalip}:{.spec.ports[0].nodePort}" echo } @@ -261,7 +261,7 @@ get-url() { : ${deployment:? required} pod=$(kubectl get po -lrun=${deployment} -o jsonpath='{.items[0].metadata.name}') rndPath=$(kubectl logs ${pod} |sed -n '/HTTP server is listening at/ s/.*:8080//p') - externalip=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type == "ExternalIP")].address}') + externalip=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type == "ExternalIP")].address}') kubectl get svc ${deployment} -o jsonpath="open http://${externalip}:{.spec.ports[0].nodePort}${rndPath}" echo } @@ -326,15 +326,15 @@ workshop-context() { return fi kubectl config view --minify --flatten > config-orig.yaml - kubectl create ns ${workshopNamespace} - cp config-orig.yaml config-workshop.yaml + kubectl create ns ${workshopNamespace} + cp config-orig.yaml config-workshop.yaml export KUBECONFIG=$PWD/config-workshop.yaml kubectl config set-context $(kubectl config current-context) --namespace=${workshopNamespace} echo "---> context set to use namespace: ${workshopNamespace}, by:" echo "export KUBECONFIG=$KUBECONFIG" } -clean-user() { +clean-user() { ns=$1; : ${ns:?required}; @@ -370,17 +370,17 @@ EOF else # https://kubernetes.github.io/ingress-nginx/deploy/#gce-gke echo "---> create: ns,cm,sa,crole,dep" - kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/mandatory.yaml - echo "---> creates single LB" - kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/provider/cloud-generic.yaml + kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml + echo "---> creates single LB" + kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml fi ingressip=$(kubectl get svc -n ingress-nginx ingress-nginx -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo "---> checking DNS A record (*.${domain}) points to: $ingressip ..." - if [[ $(dig +short *.${domain}) == $ingressip ]] ; then + echo "---> checking DNS A record (*.${domain}) points to: $ingressip ..." + if [[ $(dig +short *.${domain}) == $ingressip ]] ; then echo "DNS setting are ok" - else + else echo "---> set external dns A record (*.${domain}) to: $ingressip" fi } From b10d7f3798a6cee42e917b08a003f73a74005970 Mon Sep 17 00:00:00 2001 From: Russell Trow Date: Fri, 27 Sep 2019 16:22:12 +0100 Subject: [PATCH 2/6] Updated workshop details for provisioning CS infra --- workshop-functions.sh | 50 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/workshop-functions.sh b/workshop-functions.sh index e29a493..9249ab7 100644 --- a/workshop-functions.sh +++ b/workshop-functions.sh @@ -96,14 +96,14 @@ namespace() { : ${workshopNamespace:? required} kubectl create ns ${namespace} - kubectl label ns ${namespace} user=${namespace} + kubectl label ns ${namespace} user=${namespace} assign-role-to-ns ${namespace} | kubectl create -f - kubectl create clusterrolebinding crb-${namespace} --clusterrole=lister --serviceaccount=${workshopNamespace}:sa-${namespace} - kubectl label clusterrolebinding crb-${namespace} user=${namespace} + kubectl label clusterrolebinding crb-${namespace} user=${namespace} kubectl create clusterrolebinding crb-cc-${namespace} --clusterrole=common-config --serviceaccount=${workshopNamespace}:sa-${namespace} - kubectl label clusterrolebinding crb-cc-${namespace} user=${namespace} - + kubectl label clusterrolebinding crb-cc-${namespace} user=${namespace} + } enable-namespaces() { @@ -114,7 +114,7 @@ enable-namespaces() { kubectl config set-context $(kubectl config current-context) --namespace=default kubectl apply -f https://raw.githubusercontent.com/lalyos/k8s-ns-admission/master/deploy-webhook-job.yaml kubectl config set-context $(kubectl config current-context) --namespace=${origns} - fi + fi kubectl patch clusterrole lister --patch='{"rules":[{"apiGroups":[""],"resources":["nodes","namespaces"],"verbs":["*"]}]}' } @@ -124,9 +124,9 @@ disable-namespaces() { depl() { declare namespace=${1} - : ${domain:=k8z.eu} + : ${domain:=training.csol.cloud} : ${namespace:? required} - : ${gitrepo:=https://github.com/ContainerSolutions/ws-kubernetes-essentials-app.git} + : ${gitrepo:=https://github.com/ContainerSolutions/timber.git} local name=${namespace} @@ -166,7 +166,7 @@ spec: - name: NS value: ${name} - name: TILLER_NAMESPACE - value: ${name} + value: ${name} - name: NODE valueFrom: fieldRef: @@ -181,7 +181,7 @@ spec: name: dev volumeMounts: - mountPath: /root/workshop - name: gitrepo + name: gitrepo --- apiVersion: v1 kind: Service @@ -206,7 +206,7 @@ metadata: nginx.org/websocket-services: ${name} labels: user: "${namespace}" - name: ${name} + name: ${name} spec: rules: - host: ${name}.${domain} @@ -222,7 +222,7 @@ dev() { declare namespace=${1} : ${namespace:? required} : ${workshopNamespace:? required} - + namespace ${namespace} namespace ${namespace}play kubectl create rolebinding crb-${namespace}-x \ @@ -230,10 +230,10 @@ dev() { --namespace=${namespace}play \ --serviceaccount=${workshopNamespace}:sa-${namespace} - depl ${namespace}| kubectl create -f - + depl ${namespace}| kubectl create -f - wait-for-deployment ${namespace} - get-url ${namespace} + get-url ${namespace} } presenter() { @@ -250,7 +250,7 @@ presenter-url() { kubectl expose deployment user0 --port 8888 --type=NodePort --name presenter fi - externalip=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type == "ExternalIP")].address}') + externalip=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type == "ExternalIP")].address}') kubectl get svc presenter -o jsonpath="open http://${externalip}:{.spec.ports[0].nodePort}" echo } @@ -265,8 +265,8 @@ get-url() { sessionurl=$(kubectl get deployments. ${deployment} -o jsonpath='{.metadata.annotations.sessionurl}') newSessionUrl="${sessionurl%/*/}${rndPath}" kubectl annotate deployments ${deployment} --overwrite sessionurl="${newSessionUrl}" - - externalip=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type == "ExternalIP")].address}') + + externalip=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type == "ExternalIP")].address}') nodePort=$(kubectl get svc ${deployment} -o jsonpath="{.spec.ports[0].nodePort}") sessionUrlNodePort="http://${externalip}:${nodePort}${rndPath}" kubectl annotate deployments ${deployment} --overwrite sessionurlnp=${sessionUrlNodePort} @@ -279,7 +279,7 @@ get-url() { init() { : ${userEmail:=$(gcloud auth list --format="value(account)" --filter=status:ACTIV 2>/dev/null)} : ${workshopNamespace:=workshop} - : ${gitrepo:=https://github.com/ContainerSolutions/ws-kubernetes-essentials-app.git} + : ${gitrepo:=https://github.com/ContainerSolutions/timber.git} workshop-context init-firewall @@ -336,15 +336,15 @@ workshop-context() { return fi kubectl config view --minify --flatten > config-orig.yaml - kubectl create ns ${workshopNamespace} - cp config-orig.yaml config-workshop.yaml + kubectl create ns ${workshopNamespace} + cp config-orig.yaml config-workshop.yaml export KUBECONFIG=$PWD/config-workshop.yaml kubectl config set-context $(kubectl config current-context) --namespace=${workshopNamespace} echo "---> context set to use namespace: ${workshopNamespace}, by:" echo "export KUBECONFIG=$KUBECONFIG" } -clean-user() { +clean-user() { ns=$1; : ${ns:?required}; @@ -353,7 +353,7 @@ clean-user() { list-sessions() { echo === unassigned sessions: - kubectl get deployments --all-namespaces -l 'user,!ghuser' + kubectl get deployments --all-namespaces -o custom-columns=:.metadata.name,:.metadata.annotations.sessionurlnp -l 'user' echo === assigned sessions: kubectl get deployments \ --all-namespaces \ @@ -384,16 +384,16 @@ EOF # https://kubernetes.github.io/ingress-nginx/deploy/#gce-gke echo "---> create: ns,cm,sa,crole,dep" kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml - echo "---> creates single LB" + echo "---> creates single LB" kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml fi ingressip=$(kubectl get svc -n ingress-nginx ingress-nginx -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo "---> checking DNS A record (*.${domain}) points to: $ingressip ..." - if [[ $(dig +short *.${domain}) == $ingressip ]] ; then + echo "---> checking DNS A record (*.${domain}) points to: $ingressip ..." + if [[ $(dig +short *.${domain}) == $ingressip ]] ; then echo "DNS setting are ok" - else + else echo "---> set external dns A record (*.${domain}) to: $ingressip" fi } From 215a26d054ace4a16640322572c5586196881385 Mon Sep 17 00:00:00 2001 From: Russell Trow Date: Fri, 27 Sep 2019 16:22:24 +0100 Subject: [PATCH 3/6] Updated workshop details for provisioning CS infra --- infra-setup.md | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/infra-setup.md b/infra-setup.md index d20c876..55d3690 100644 --- a/infra-setup.md +++ b/infra-setup.md @@ -8,7 +8,7 @@ Just use this url: [CloudShell](https://console.cloud.google.com/cloudshell/open ## Configure Project ``` -gcloud config set project container-solutions-workshops +gcloud config set project container-solutions-workshops ``` list existing clusters @@ -29,20 +29,18 @@ gcloud beta container \ clusters create "workshop" \ --zone "europe-west3-b" \ --username "admin" \ - --cluster-version "1.12.7-gke.10" \ + --cluster-version "1.13.7-gke.8" \ --machine-type "n1-standard-2" \ --image-type "UBUNTU" \ --disk-type "pd-standard" \ --disk-size "100" \ --metadata disable-legacy-endpoints=true \ --scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" \ - --num-nodes "3" \ + --num-nodes "4" \ --enable-cloud-logging \ - --enable-cloud-monitoring \ --no-enable-ip-alias \ --network "projects/container-solutions-workshops/global/networks/default" \ - --addons HorizontalPodAutoscaling,HttpLoadBalancing,Istio \ - --istio-config auth=MTLS_PERMISSIVE \ + --addons HorizontalPodAutoscaling,HttpLoadBalancing \ --enable-autoupgrade \ --enable-autorepair \ && gcloud beta container \ @@ -50,7 +48,7 @@ gcloud beta container \ node-pools create "pool-1" \ --cluster "workshop" \ --zone "europe-west3-b" \ - --node-version "1.12.7-gke.10" \ + --node-version "1.13.7-gke.8" \ --machine-type "n1-standard-2" \ --image-type "UBUNTU" \ --disk-type "pd-standard" \ @@ -58,12 +56,12 @@ gcloud beta container \ --metadata disable-legacy-endpoints=true \ --scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" \ --preemptible \ - --num-nodes "3" \ + --num-nodes "4" \ --no-enable-autoupgrade \ --enable-autorepair ``` -checking the GKE cluster +checking the GKE cluster ``` gcloud container clusters list ``` @@ -77,8 +75,8 @@ gcloud container clusters get-credentials workshop --zone=europe-west3-b You need to set up the following 2 env vars: ``` export workshopNamespace=workshop -export domain=k8z.eu -export gitrepo=https://github.com/lalyos/timber +export domain=cict.training.csol.cloud +export gitrepo=https://github.com/ContainerSolutions/timber ``` First you have to load the helper bash functions: @@ -132,7 +130,12 @@ kubectl get all -n ingress-nginx DNS setup Follow the instructions of `init-ingress` function about the IP adress of the deployed ingress controller. - + +## Setup Ingress domain + +Ensure that the ".training.csol.cloud" domain point to the IP address of the Ingress + +https://console.cloud.google.com/net-services/dns/zones/training-csol-cloud?project=container-solutions-workshops&authuser=1&organizationId=879351307558 ## Create user sessions @@ -145,7 +148,7 @@ Please note, the first couple may take more time, as the docker image should be To create more user sssions use the following line ``` -for u in user{2..15}; do dev $u; done +for u in user{2..12}; do dev $u; done ``` @@ -175,7 +178,7 @@ to get user session authentications 2 steps needed: update the file 'common.env' with something like: ``` ... -SSH_DOMAIN=n1.k8z.eu +SSH_DOMAIN=n1.training.csol.cloud SSH_PORT=32531 ... ``` @@ -204,7 +207,7 @@ kubectl create secret generic gitter \ # todo automate setting of gitter room: export workshopNamespace=workshop -export domain=k8z.eu +export domain=training.csol.cloud curl -sL https://raw.githubusercontent.com/lalyos/gitter-scripter/master/gitter-template.yaml \ | envsubst \ | kubectl apply -f - @@ -213,4 +216,4 @@ export gitterRoom=lalyos/earthport kubectl patch deployments gitter --patch '{"spec":{"template":{"spec":{"$setElementOrder/containers":[{"name":"gitter"}],"containers":[{"$setElementOrder/env":[{"name":"GITTER_ROOM_NAME"},{"name":"DOMAIN"}],"env":[{"name":"GITTER_ROOM_NAME","value":"'${gitterRoom}'"}],"name":"gitter"}]}}}}' ``` -The users can self service at: http://session.k8z.eu +The users can self service at: http://session.training.csol.cloud From d5f1210f23e7e3402ef0712e669af8582fe44f30 Mon Sep 17 00:00:00 2001 From: Ian Crosby Date: Thu, 24 Oct 2019 15:10:46 -0400 Subject: [PATCH 4/6] update gke version in sample command, and add label nodes command --- infra-setup.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/infra-setup.md b/infra-setup.md index 55d3690..78c6b25 100644 --- a/infra-setup.md +++ b/infra-setup.md @@ -29,7 +29,7 @@ gcloud beta container \ clusters create "workshop" \ --zone "europe-west3-b" \ --username "admin" \ - --cluster-version "1.13.7-gke.8" \ + --cluster-version "1.13.10-gke.0" \ --machine-type "n1-standard-2" \ --image-type "UBUNTU" \ --disk-type "pd-standard" \ @@ -48,7 +48,7 @@ gcloud beta container \ node-pools create "pool-1" \ --cluster "workshop" \ --zone "europe-west3-b" \ - --node-version "1.13.7-gke.8" \ + --node-version "1.13.10-gke.0" \ --machine-type "n1-standard-2" \ --image-type "UBUNTU" \ --disk-type "pd-standard" \ @@ -127,6 +127,12 @@ To check that the nginx ingress is fully deployed, list resources in the **ingre kubectl get all -n ingress-nginx ``` +If your nginx pod is stuck in `Pending` stage, you may be missing the expected label on your nodes. This can be solved with the following command which will apply the expected label to all nodes: + +``` +kubectl label node --all kubernetes.io/os=linux +``` + DNS setup Follow the instructions of `init-ingress` function about the IP adress of the deployed ingress controller. From 1b8fb708d1ea189ac3c0b6badaa2eafb2c2532d6 Mon Sep 17 00:00:00 2001 From: Russell Trow Date: Wed, 19 Aug 2020 13:24:24 +0100 Subject: [PATCH 5/6] Brought apiVersion of Kubernetes resources up to date --- workshop-functions.sh | 54 +++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/workshop-functions.sh b/workshop-functions.sh index e2e2524..76eac5a 100644 --- a/workshop-functions.sh +++ b/workshop-functions.sh @@ -17,7 +17,7 @@ metadata: user: "${namespace}" --- kind: Role -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 metadata: name: role-${namespace} namespace: ${namespace} @@ -46,7 +46,7 @@ rules: - list --- kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 metadata: name: rb-${namespace} namespace: ${namespace} @@ -62,7 +62,7 @@ roleRef: name: role-${namespace} --- kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 metadata: name: rb-def-${namespace} namespace: ${namespace} @@ -96,16 +96,16 @@ namespace() { : ${workshopNamespace:? required} kubectl create ns ${namespace} - kubectl label ns ${namespace} user=${namespace} + kubectl label ns ${namespace} user=${namespace} assign-role-to-ns ${namespace} | kubectl create -f - kubectl create clusterrolebinding crb-${namespace} --clusterrole=lister --serviceaccount=${workshopNamespace}:sa-${namespace} - kubectl label clusterrolebinding crb-${namespace} user=${namespace} + kubectl label clusterrolebinding crb-${namespace} user=${namespace} kubectl create clusterrolebinding crb-cc-${namespace} --clusterrole=common-config --serviceaccount=${workshopNamespace}:sa-${namespace} - kubectl label clusterrolebinding crb-cc-${namespace} user=${namespace} + kubectl label clusterrolebinding crb-cc-${namespace} user=${namespace} kubectl create clusterrolebinding crb-ssh-${namespace} --clusterrole=sshreader --serviceaccount=${workshopNamespace}:sa-${namespace} - kubectl label clusterrolebinding crb-ssh-${namespace} user=${namespace} + kubectl label clusterrolebinding crb-ssh-${namespace} user=${namespace} } enable-namespaces() { @@ -116,7 +116,7 @@ enable-namespaces() { kubectl config set-context $(kubectl config current-context) --namespace=default kubectl apply -f https://raw.githubusercontent.com/lalyos/k8s-ns-admission/master/deploy-webhook-job.yaml kubectl config set-context $(kubectl config current-context) --namespace=${origns} - fi + fi kubectl patch clusterrole lister --patch='{"rules":[{"apiGroups":[""],"resources":["nodes","namespaces"],"verbs":["*"]}]}' } @@ -130,11 +130,11 @@ depl() { : ${namespace:? required} : ${gitrepo:? required} : ${sessionSecret:=cloudnative1337} - + local name=${namespace} cat < config-orig.yaml - kubectl create ns ${workshopNamespace} - cp config-orig.yaml config-workshop.yaml + kubectl create ns ${workshopNamespace} + cp config-orig.yaml config-workshop.yaml export KUBECONFIG=$PWD/config-workshop.yaml kubectl config set-context $(kubectl config current-context) --namespace=${workshopNamespace} echo "---> context set to use namespace: ${workshopNamespace}, by:" echo "export KUBECONFIG=$KUBECONFIG" } -clean-user() { +clean-user() { ns=$1; : ${ns:?required}; @@ -405,16 +405,16 @@ EOF # https://kubernetes.github.io/ingress-nginx/deploy/#gce-gke echo "---> create: ns,cm,sa,crole,dep" kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.26.1/deploy/static/mandatory.yaml - echo "---> creates single LB" + echo "---> creates single LB" kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.26.1/deploy/static/provider/cloud-generic.yaml fi ingressip=$(kubectl get svc -n ingress-nginx ingress-nginx -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo "---> checking DNS A record (*.${domain}) points to: $ingressip ..." - if [[ $(dig +short "*.${domain}") == $ingressip ]] ; then + echo "---> checking DNS A record (*.${domain}) points to: $ingressip ..." + if [[ $(dig +short "*.${domain}") == $ingressip ]] ; then echo "DNS setting are ok" - else + else echo "---> set external dns A record (*.${domain}) to: $ingressip" fi } From 0016c8bf2e85addb9b5a0e59f3c07e7e388cbd21 Mon Sep 17 00:00:00 2001 From: PathogenDE <49752332+PathogenDE@users.noreply.github.com> Date: Mon, 2 Nov 2020 10:50:10 +0000 Subject: [PATCH 6/6] Fixed typo --- workshop-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workshop-functions.sh b/workshop-functions.sh index 76eac5a..ad9c0dc 100644 --- a/workshop-functions.sh +++ b/workshop-functions.sh @@ -71,7 +71,7 @@ metadata: subjects: - kind: ServiceAccount name: default - namespace: ${mamespace} + namespace: ${namespace} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role