Compare commits
3 commits
d2bbb7674d
...
793325d724
Author | SHA1 | Date | |
---|---|---|---|
793325d724 | |||
1351b7b217 | |||
776400d1e3 |
3 changed files with 48 additions and 1 deletions
|
@ -41,6 +41,7 @@ tasks:
|
|||
DEPS: >-
|
||||
age
|
||||
ansible
|
||||
cilium-cli
|
||||
direnv
|
||||
derailed/k9s/k9s
|
||||
fluxcd/tap/flux
|
||||
|
@ -52,6 +53,7 @@ tasks:
|
|||
kustomize
|
||||
pre-commit
|
||||
prettier
|
||||
shellcheck
|
||||
sops
|
||||
stern
|
||||
talhelper
|
||||
|
|
|
@ -11,7 +11,8 @@ helm plugin install https://github.com/databus23/helm-diff
|
|||
### Bootstrap talos cluster
|
||||
|
||||
```sh
|
||||
omnictl cluster template sync -f ./omni-homelab-export.yaml --omniconfig ./omniconfig.yaml
|
||||
talosctl apply-config --nodes=10.1.1.61 --file=./kubernetes/bootstrap/talos/clusterconfig/homelab-shadowfax.yaml --insecure
|
||||
talosctl bootstrap --nodes=10.1.1.61
|
||||
```
|
||||
## CNI & Container Proxy
|
||||
|
||||
|
|
44
kubernetes/tools/nsenter.sh
Executable file
44
kubernetes/tools/nsenter.sh
Executable file
|
@ -0,0 +1,44 @@
|
|||
#!/bin/sh
|
||||
set -x
|
||||
|
||||
node=${1}
|
||||
#nodeName=$(kubectl get node ${node} -o template --template='{{index .metadata.labels "kubernetes.io/hostname"}}')
|
||||
nodeSelector='"nodeSelector": { "kubernetes.io/hostname": "'${node:?}'" },'
|
||||
podName=${USER}-nsenter-${node}
|
||||
kubectl -n kube-system run ${podName:?} --restart=Never -it --rm --image overriden --overrides '
|
||||
{
|
||||
"spec": {
|
||||
"hostPID": true,
|
||||
"hostNetwork": true,
|
||||
'"${nodeSelector?}"'
|
||||
"tolerations": [{
|
||||
"operator": "Exists"
|
||||
}],
|
||||
"containers": [
|
||||
{
|
||||
"name": "nsenter",
|
||||
"image": "mirror.gcr.io/library/busybox:musl",
|
||||
"command": ["sh", "-c", "mkdir -p /host/var/lib/busybox; cp -r /bin/busybox /host/var/lib/busybox/; export PATH=\"$PATH:/var/lib/busybox\"; /host/var/lib/busybox/busybox --install /host/var/lib/busybox; nsenter -t1 -m -u -i -n /var/lib/busybox/busybox sh"],
|
||||
"stdin": true,
|
||||
"tty": true,
|
||||
"securityContext": {
|
||||
"privileged": true
|
||||
},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "host-tmp",
|
||||
"mountPath": "/host/var"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"volumes": [
|
||||
{
|
||||
"name": "host-tmp",
|
||||
"hostPath": {
|
||||
"path": "/var"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}'
|
Loading…
Reference in a new issue