mirror of
https://github.com/wahyd4/home-docker.git
synced 2026-08-09 04:15:52 +10:00
68 lines
2.4 KiB
Bash
Executable File
68 lines
2.4 KiB
Bash
Executable File
#! /bin/bash -eu
|
|
|
|
## install nginx ingress controller grafana dashboards
|
|
# https://github.com/kubernetes/ingress-nginx/tree/master/deploy/grafana/dashboards
|
|
|
|
kubectl -n kube-system apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
|
|
|
|
k apply -f prometheus-pv.yml -n default
|
|
|
|
helm upgrade --install prometheus -n default -f prometheus-values.yaml stable/prometheus-operator
|
|
|
|
k create namespace nginx-ingress
|
|
|
|
helm upgrade --install ingress bitnami/nginx-ingress-controller -n nginx-ingress -f nginx-values.yaml
|
|
|
|
k apply -f prometheus-ingress.yml
|
|
|
|
kubectl -n default create secret generic oauth2-proxy-creds \
|
|
--from-literal=cookie-secret=ZuThURd/AK9ouHNxg0Czhg== \
|
|
--from-literal=client-id=4f46385b435275c693ec \
|
|
--from-literal=client-secret=518d5b4693aaaee3e62ce5b8d9da6ec5cc160098
|
|
|
|
helm upgrade oauth2-proxy --install stable/oauth2-proxy \
|
|
--reuse-values \
|
|
--values oauth2-proxy-config.yaml
|
|
|
|
k apply -f postgres-pv.yml -n default
|
|
|
|
k create namespace db && helm upgrade --install postgres -n db -f postgres-values.yaml bitnami/postgresql
|
|
|
|
# media applications
|
|
|
|
k apply -f media.yaml
|
|
|
|
|
|
# influxdb
|
|
|
|
|
|
helm upgrade --install influxdb bitnami/influxdb --namespace db \
|
|
--set adminUser.name=junv \
|
|
--set adminUser.pwd=Lovewifi2020! \
|
|
--set persistence.storageClass=manual \
|
|
--set persistence.existingClaim=influxdb \
|
|
--set influxdb.securityContext.fsGroup=1000 \
|
|
--set influxdb.securityContext.runAsUser=1000
|
|
|
|
# metabase
|
|
k apply -f metabase.yaml -n home-apps
|
|
|
|
# create secret
|
|
kubectl -n apps create secret generic database-credentials --from-literal=password=wGWHn9bhjJbM27V
|
|
|
|
k apply -f pihole-pv.yaml -n home-apps
|
|
|
|
kubectl -n home-apps create secret generic pihole-admin-password --from-literal=webpassword=Uj2s3iUkRubkJs4
|
|
|
|
helm upgrade --install telegraf -f telegraf-values.yaml stable/telegraf -n home-apps
|
|
|
|
|
|
### level=error ts=2020-06-25T14:19:22.581Z caller=klog.go:94 component=k8s_client_runtime func=ErrorDepth msg="/app/discovery/kubernetes/kubernetes.go:263: Failed to list *v1.Pod: pods is forbidden: User \"system:serviceaccount:default:default\" cannot list resource \"pods\" in API group \"\" in the namespace \"home-apps\""
|
|
# https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/getting-started.md
|
|
# service account
|
|
|
|
k apply -f prometheus-service-account.yaml -n default
|
|
|
|
# create service monitor for telegraf
|
|
k apply -f telegraf-service-monitor.yaml -n default
|