nlopez / k8s_home

Kubernetes
48 stars 6 forks source link
homelab k8s kubernetes

k8s

A collection of Kubernetes objects for my home setup

Notes

kubeadm

kubeadm init --config kubeadm-init.conf --upload-certs
# run control plane join command printed by kubeadm on additional masters

CNI: Cilium

cilium install --helm-values=cilium-values.yaml

Untaint master/control-plane

kubectl taint nodes --all node-role.kubernetes.io/master-
kubectl taint nodes --all node-role.kubernetes.io/control-plane-

Wait for coredns/control plane running

kubectl get pod --all-namespaces -owide --watch

metallb

kubectl apply -f 00-namespace.yaml -f metallb-system

Sealed secrets

kubectl apply -f /path/to/kubeseal-secret-key
kubectl apply -f kube-system/kubeseal

flux

kubectl apply -f flux
fluxctl --k8s-fwd-ns flux identity  # add key to GitHub with write access
# wait a bit for repo clone
fluxctl --k8s-fwd-ns flux sync

Un/ignoring resources with flux

# Ignore
kubectl annotate <resource> "flux.weave.works/ignore"

# Unignore
kubectl annotate <resource> "flux.weave.works/ignore"-

# Ignore all in namespace
# (doesn't seem like there is --all-namespaces for this.)
kubectl -n default annotate all --all "flux.weave.works/ignore"

# Unignore all in namespace
kubectl -n default annotate all --all "flux.weave.works/ignore"-

See https://github.com/fluxcd/flux/issues/1211 for more

TODO

Thanks