mirror of
https://github.com/furyhawk/cloudy.git
synced 2026-05-23 08:25:57 +00:00
Refactor Kubernetes configuration to use Traefik for dashboard routing
This commit is contained in:
@@ -1,6 +1,11 @@
|
|||||||
# to run define K3S_TOKEN, K3S_VERSION is optional, eg:
|
# to run define K3S_TOKEN, K3S_VERSION is optional, eg:
|
||||||
|
# export K3S_VERSION=v1.21.4+k3s1
|
||||||
|
# export K3S_TOKEN=your_secret_token
|
||||||
|
# export RANDOM="$(openssl rand -hex 8)"
|
||||||
|
# export RANDOM="$(python3 -c 'import secrets; print(secrets.token_urlsafe(32))')"
|
||||||
# export K3S_TOKEN=${RANDOM}${RANDOM}${RANDOM}
|
# export K3S_TOKEN=${RANDOM}${RANDOM}${RANDOM}
|
||||||
# docker compose -f k3s.yml up -d
|
# docker compose -f k3s.yml up -d
|
||||||
|
# export KUBECONFIG=$(pwd)/config/kubeconfig.yaml
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: "rancher/k3s:${K3S_VERSION:-latest}"
|
image: "rancher/k3s:${K3S_VERSION:-latest}"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
```bash
|
```bash
|
||||||
export K3S_TOKEN=${RANDOM}${RANDOM}${RANDOM}
|
export K3S_TOKEN=${RANDOM}${RANDOM}${RANDOM}
|
||||||
docker compose -f k3s.yml up -d
|
docker compose -f k3s.yml up -d
|
||||||
|
export KUBECONFIG=$(pwd)/config/kubeconfig.yaml
|
||||||
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
|
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
|
||||||
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml
|
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml
|
||||||
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/user-guides/crd-acme/02-services.yml
|
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/user-guides/crd-acme/02-services.yml
|
||||||
|
|||||||
Reference in New Issue
Block a user