Kubernetes manifests for Kubernetes cluster configurations
Find a file
Simon Cornet 47131c1f6e
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
chore: add .editorconfig and .gitattributes
2026-05-27 14:24:26 +02:00
.woodpecker ci: add yamllint and markdownlint steps with gitleaks prerequisite 2026-05-18 18:23:03 +02:00
manifests feat: remove tmpfs-fast storageclass 2026-05-12 09:10:14 +02:00
.editorconfig chore: add .editorconfig and .gitattributes 2026-05-27 14:24:26 +02:00
.gitattributes chore: add .editorconfig and .gitattributes 2026-05-27 14:24:26 +02:00
.gitignore feat: initial commit 2026-01-22 13:49:02 +01:00
.markdownlint-cli2.jsonc ci: add yamllint and markdownlint steps with gitleaks prerequisite 2026-05-18 18:23:03 +02:00
.yamllint feat: initial commit 2026-01-22 13:49:02 +01:00
readme.md fix: dont conflict with default username var 2026-01-22 13:57:39 +01:00
renovate.json feat: initial commit 2026-01-22 13:49:02 +01:00

cluster-configs

These manifests configure the generic cluster configurations done afterwards. Like creating users.

Usermanagement

To create a kubeconfig file for a user created by this manifest, execute the following.

# Username
KUBE_USERNAME=foo-bar

# Get the token
TOKEN=$(kubectl create token ${KUBE_USERNAME} -n kube-system --duration=87600h)

# Get cluster info
CLUSTER_NAME=$(kubectl config view --minify -o jsonpath='{.clusters[0].name}')
CLUSTER_SERVER=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}')
CLUSTER_CA=$(kubectl config view --minify --raw -o jsonpath='{.clusters[0].cluster.certificate-authority-data}')

# Create kubeconfig
cat > ${KUBE_USERNAME}-kubeconfig.yaml <<EOF
apiVersion: v1
kind: Config
clusters:
- cluster:
    certificate-authority-data: ${CLUSTER_CA}
    server: ${CLUSTER_SERVER}
  name: ${CLUSTER_NAME}
contexts:
- context:
    cluster: ${CLUSTER_NAME}
    user: ${KUBE_USERNAME}
  name: ${KUBE_USERNAME}@${CLUSTER_NAME}
current-context: ${KUBE_USERNAME}@${CLUSTER_NAME}
users:
- name: ${KUBE_USERNAME}
  user:
    token: ${TOKEN}
EOF