From 62779d47b29d395c17504a50eb3948fe31203b7b Mon Sep 17 00:00:00 2001 From: djpbessems Date: Tue, 10 Nov 2020 17:37:52 +0100 Subject: [PATCH] Fix filename consistency --- README.md | 43 +++++++++++-------- ...gMap_traefik.yml => configMap-Traefik.yml} | 0 ...traefik.yaml => ingressRoute-Traefik.yaml} | 0 ....yml => persistentVolumeClaim-Traefik.yml} | 0 ...gMap_Adminer.yml => configMap-Adminer.yml} | 0 ..._Guacamole.yml => configMap-Guacamole.yml} | 0 ...ap_lighttpd.yml => configMap-Lighttpd.yml} | 0 ...ute_Vault.yaml => ingressRoute-Vault.yaml} | 0 ...e_Vault.yml => persistentVolume-Vault.yml} | 0 storage/flexVolSMB/daemonSet-flexVolSMB.yml | 4 +- 10 files changed, 27 insertions(+), 20 deletions(-) rename ingress/Traefik2.x/{configMap_traefik.yml => configMap-Traefik.yml} (100%) rename ingress/Traefik2.x/{ingressRoute_traefik.yaml => ingressRoute-Traefik.yaml} (100%) rename ingress/Traefik2.x/{pvc_traefik.yml => persistentVolumeClaim-Traefik.yml} (100%) rename services/Adminer/{configMap_Adminer.yml => configMap-Adminer.yml} (100%) rename services/Guacamole/{configMap_Guacamole.yml => configMap-Guacamole.yml} (100%) rename services/Lighttpd/{configMap_lighttpd.yml => configMap-Lighttpd.yml} (100%) rename services/Vault/{ingressRoute_Vault.yaml => ingressRoute-Vault.yaml} (100%) rename services/Vault/{persistentVolume_Vault.yml => persistentVolume-Vault.yml} (100%) diff --git a/README.md b/README.md index 51ba523..eff6c86 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,13 @@ ## K3s cluster On first node: ``` -curl -sfL https://get.k3s.io | sh -s - --no-deploy traefik +curl -sfL https://get.k3s.io | sh -s - --no-deploy traefik --cluster-init cat /var/lib/rancher/k3s/server/token kubectl config view --raw ``` On subsequent nodes: ``` -curl -sfL https://get.k3s.io | K3S_URL=https://:6443 K3S_TOKEN= sh - +curl -sfL https://get.k3s.io | K3S_TOKEN= sh -s - --server https://:6443 --no-deploy traefik ``` Install Rancher's [System Upgrade Controller](https://rancher.com/docs/k3s/latest/en/upgrades/automated/): @@ -34,6 +34,10 @@ See https://github.com/kubernetes-csi/csi-driver-smb: ``` curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/deploy/install-driver.sh | bash -s master -- ``` +Store credentials in `secret`: +``` +kubectl create secret generic smb-credentials --from-literal username=<> --from-literal domain=<> --from-literal password=<> +``` #### 1.2) `flexVolume` for SMB (CIFS): ``` @@ -74,7 +78,7 @@ Install [Longhorn](https://code.spamasaurus.com/djpbessems/Kubernetes.K3s.instal ##### 2.1) Create `configMap`, `secret` and `persistentVolumeClaim` The `configMap` contains Traefik's static and dynamic config: ``` -kubectl apply -f ingress/Traefik2.x/configMap_traefik.yml +kubectl apply -f ingress/Traefik2.x/configMap-Traefik.yml ``` The `secret` contains credentials for Cloudflare's API: @@ -84,7 +88,7 @@ kubectl create secret generic traefik-cloudflare --from-literal=CF_API_EMAIL=<(SQL management) ``` -kubectl apply -f services/Adminer/configMap_Adminer.yml -kubectl apply -f services/Adminer/deploy_Adminer.yml +kubectl apply -f services/Adminer/configMap-Adminer.yml +kubectl apply -f services/Adminer/deploy-Adminer.yml ``` Vault configuration: ``` @@ -156,7 +162,7 @@ vault policy write adminer /home/vault/app-policy.hcl ##### 4.2) [Bitwarden_rs](https://github.com/dani-garcia/bitwarden_rs) (password manager) *Requires [mount.cifs](https://linux.die.net/man/8/mount.cifs)' option `nobrl`* ``` -kubectl apply -f services/Bitwarden/deployment_Bitwarden.yml +kubectl apply -f services/Bitwarden/deploy-Bitwarden.yml ``` Vault configuration: ``` @@ -173,7 +179,7 @@ vault policy write bitwarden /home/vault/app-policy.hcl ``` ##### 4.3) [DroneCI](https://drone.io/) (contineous delivery) ``` -kubectl apply -f services/DroneCI/deployment_DroneCI.yml +kubectl apply -f services/DroneCI/deploy-DroneCI.yml ``` Vault configuration: ``` @@ -190,17 +196,17 @@ vault policy write drone /home/vault/app-policy.hcl ``` ##### 4.4) [Gitea](https://gitea.io/) (git repository) ``` -kubectl apply -f services/Gitea/deployment_Gitea.yml +kubectl apply -f services/Gitea/deploy-Gitea.yml ``` ##### 4.5) [Gotify](https://gotify.net/) (notifications) ``` -kubectl apply -f services/Gotify/deploy_Gotify.yml +kubectl apply -f services/Gotify/deploy-Gotify.yml ``` ##### 4.6) [Guacamole](https://guacamole.apache.org/doc/gug/guacamole-docker.html) (remote desktop gateway) *Requires specifying a `uid` & `gid` in both the `securityContext` of the MySQL container and the `persistentVolume`* ``` -kubectl apply -f services/Guacamole/configMap_Guacamole.yml -kubectl apply -f services/Guacamole/deployment_Guacamole.yml +kubectl apply -f services/Guacamole/configMap-Guacamole.yml +kubectl apply -f services/Guacamole/deploy-Guacamole.yml ``` Wait for the included containers to start, then perform the following commands to initialize the database: ``` @@ -211,12 +217,12 @@ kubectl rollout restart deployment guacamole ##### 4.7) [Harbor](https://goharbor.io/) (container image registry) Create `ingressRoute` and `storageClass` ``` +kubectl create namespace harbor kubectl apply -f services/Harbor/ingressRoute-Harbor.yml kubectl apply -f services/Harbor/storageClass-Harbor.yml ``` Install Helm chart ``` -kubectl create namespace harbor helm repo add harbor https://helm.goharbor.io helm repo update helm install harbor harbor/harbor --namespace harbor --values=services/Harbor/chart-values.yml @@ -225,13 +231,14 @@ helm install harbor harbor/harbor --namespace harbor --values=services/Harbor/ch ##### 4.8) [Lighttpd](https://www.lighttpd.net/) (webserver) *Serves various semi-containerized websites; respective webcontent is stored on fileshare* ``` -kubectl apply -f services/Lighttpd/configMap_lighttpd.yml -kubectl apply -f services/Lighttpd/deploy_Lighttpd.yml +kubectl apply -f services/Lighttpd/configMap-Lighttpd.yml +kubectl apply -f services/Lighttpd/deploy-Lighttpd.yml kubectl apply -f services/Lighttpd/cronJob-Spotweb.yml ``` ##### 4.9) PVR `namespace` (automated media management) *Containers use shared resources to be able to interact with downloaded files* ``` +kubectl create secret generic --type=mount/smb smb-secret --from-literal=username=<> --from-literal=password=<> -n pvr kubectl apply -f services/PVR/persistentVolumeClaim-PVR.yml kubectl apply -f services/PVR/storageClass-PVR.yml ``` @@ -260,11 +267,11 @@ kubectl apply -f services/PVR/deploy-Sonarr.yml ##### 4.10) [Shaarli](https://github.com/shaarli/Shaarli) (bookmarks/notes) ``` -kubectl apply -f services/Shaarli/deploy_Shaarli.yml +kubectl apply -f services/Shaarli/deploy-Shaarli.yml ``` ##### 4.11) [Theia](https://theia-ide.org/) (web IDE) ``` -kubectl apply -f services/Theia/deploy_Theia.yml +kubectl apply -f services/Theia/deploy-Theia.yml ``` ##### 4.12) [Traefik-Certs-Dumper](https://github.com/ldez/traefik-certs-dumper) (certificate tooling) ``` diff --git a/ingress/Traefik2.x/configMap_traefik.yml b/ingress/Traefik2.x/configMap-Traefik.yml similarity index 100% rename from ingress/Traefik2.x/configMap_traefik.yml rename to ingress/Traefik2.x/configMap-Traefik.yml diff --git a/ingress/Traefik2.x/ingressRoute_traefik.yaml b/ingress/Traefik2.x/ingressRoute-Traefik.yaml similarity index 100% rename from ingress/Traefik2.x/ingressRoute_traefik.yaml rename to ingress/Traefik2.x/ingressRoute-Traefik.yaml diff --git a/ingress/Traefik2.x/pvc_traefik.yml b/ingress/Traefik2.x/persistentVolumeClaim-Traefik.yml similarity index 100% rename from ingress/Traefik2.x/pvc_traefik.yml rename to ingress/Traefik2.x/persistentVolumeClaim-Traefik.yml diff --git a/services/Adminer/configMap_Adminer.yml b/services/Adminer/configMap-Adminer.yml similarity index 100% rename from services/Adminer/configMap_Adminer.yml rename to services/Adminer/configMap-Adminer.yml diff --git a/services/Guacamole/configMap_Guacamole.yml b/services/Guacamole/configMap-Guacamole.yml similarity index 100% rename from services/Guacamole/configMap_Guacamole.yml rename to services/Guacamole/configMap-Guacamole.yml diff --git a/services/Lighttpd/configMap_lighttpd.yml b/services/Lighttpd/configMap-Lighttpd.yml similarity index 100% rename from services/Lighttpd/configMap_lighttpd.yml rename to services/Lighttpd/configMap-Lighttpd.yml diff --git a/services/Vault/ingressRoute_Vault.yaml b/services/Vault/ingressRoute-Vault.yaml similarity index 100% rename from services/Vault/ingressRoute_Vault.yaml rename to services/Vault/ingressRoute-Vault.yaml diff --git a/services/Vault/persistentVolume_Vault.yml b/services/Vault/persistentVolume-Vault.yml similarity index 100% rename from services/Vault/persistentVolume_Vault.yml rename to services/Vault/persistentVolume-Vault.yml diff --git a/storage/flexVolSMB/daemonSet-flexVolSMB.yml b/storage/flexVolSMB/daemonSet-flexVolSMB.yml index 9d22a96..6f8584a 100644 --- a/storage/flexVolSMB/daemonSet-flexVolSMB.yml +++ b/storage/flexVolSMB/daemonSet-flexVolSMB.yml @@ -13,7 +13,7 @@ spec: app: juliohm-cifs-volumedriver-installer spec: containers: - - image: juliohm/kubernetes-cifs-volumedriver-installer:2.0 + - image: juliohm/kubernetes-cifs-volumedriver-installer:2.3 name: flex-deploy imagePullPolicy: Always env: @@ -29,4 +29,4 @@ spec: volumes: - name: flexvolume-mount hostPath: - path: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/ \ No newline at end of file + path: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/