Skip to content

Commit

Permalink
Add --atomic to more helm installs; create 'monitor' namespace'; fix …
Browse files Browse the repository at this point in the history
…metrics-server tls issue; note new bug with Airflow in 'extras'.
  • Loading branch information
boldandbusted committed Dec 22, 2021
1 parent ab34613 commit d8de7c3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
17 changes: 10 additions & 7 deletions extras/apache-airflow.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#!/usr/bin/env bash

## ERRORS currently on postgresql pod...
## 2021-12-22 01:33:09.756 GMT [613] FATAL: password authentication failed for user "bn_airflow"
## 2021-12-22 01:33:09.756 GMT [613] DETAIL: Password does not match for user "bn_airflow".
## Connection matched pg_hba.conf line 1: "host all all 0.0.0.0/0 md5"
##

. ./lib/dashboard.sh

helm repo add bitnami https://charts.bitnami.com/bitnami
helm install my-release bitnami/airflow

exit

sleep 60
helm install --atomic my-release bitnami/airflow
kubectl port-forward service/my-release-airflow 8443:8080 --address=0.0.0.0 >> /dev/null &
echo "Browse to https://kind.test:8443/ for Apache Airflow interface."
my_ip=$(ip -j -p addr show eth1 | jq -r .[].addr_info[0].local)
echo "Browse to https://kind.test:8443/ or https://$my_ip:8443/ for Apache Airflow interface."
export AIRFLOW_PASSWORD=$(kubectl get secret --namespace default my-release-airflow -o jsonpath="{.data.airflow-password}" | base64 --decode)
echo Password: $AIRFLOW_PASSWORD
echo "Airflow password: $AIRFLOW_PASSWORD"
8 changes: 5 additions & 3 deletions extras/fun_with_prometheus_grafana_and_k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ helm repo update
#helm upgrade --atomic my-metrics-server bitnami/metrics-server --set apiService.create=true
helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/
helm repo update
helm install my-metrics-server metrics-server/metrics-server --version 3.6.0 --set apiService.create=true --set args={kubelet-insecure-tls} -n monitor
kubectl create namespace monitor
helm install --atomic my-metrics-server metrics-server/metrics-server --version 3.6.0 --set apiService.create=true --set args={--kubelet-insecure-tls} -n monitor
helm install --atomic my-kube-state-metrics bitnami/kube-state-metrics --version 2.1.1
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
Expand All @@ -15,8 +16,9 @@ helm install --atomic my-prometheus-stack prometheus-community/kube-prometheus-s
--set prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false
sleep 30
kubectl port-forward -n monitor prometheus-my-prometheus-stack-kube-p-prometheus-0 9090 --address 0.0.0.0 >> /dev/null &
echo "Prometheus UI: http://kind.test:9090/"
my_ip=$(ip -j -p addr show eth1 | jq -r .[].addr_info[0].local)
echo "Prometheus UI: http://kind.test:9090/ or http://$my_ip:9090/"
kubectl --namespace monitor port-forward svc/my-prometheus-stack-grafana 3000:80 --address 0.0.0.0 >> /dev/null &
echo "Grafana: http://kind.test:3000/ user: admin password: prom-operator"
echo "Grafana: http://kind.test:3000/ or http://$my_ip:9090/ user: admin password: prom-operator"


3 changes: 2 additions & 1 deletion extras/google-demo-microservice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ kubectl -n demo apply -f ./release/kubernetes-manifests.yaml
kubectl wait --for=condition=available deployment/frontend -n demo
#kubectl port-forward deployment/frontend 9292:8080
kubectl -n demo port-forward svc/frontend 8081:80 --address 0.0.0.0 >> /dev/null &
echo "Browse to http://kind.test:8081"
my_ip=$(ip -j -p addr show eth1 | jq -r .[].addr_info[0].local)
echo "Browse to http://kind.test:8081 or http://$my_ip:8081/"
3 changes: 2 additions & 1 deletion extras/lib/dashboard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ subjects:
namespace: kubernetes-dashboard
EOF

echo "Browse to https://kind.test:8080/"
my_ip=$(ip -j -p addr show eth1 | jq -r .[].addr_info[0].local)
echo "Browse to https://kind.test:8080/ or https://$my_ip:8080/"
kubectl port-forward -n kubernetes-dashboard service/dashboard-kubernetes-dashboard 8080:443 --address=0.0.0.0 >> /dev/null &

echo "Display the Token (copy and paste this into the Dashboard Web UI)"
Expand Down

0 comments on commit d8de7c3

Please sign in to comment.