I hereby claim:
- I am stealthybox on github.
- I am stealthybox (https://keybase.io/stealthybox) on keybase.
- I have a public key whose fingerprint is 05E7 89C9 142C DD05 8261 4EF8 5943 2144 444F B382
To claim this, I am signing this object:
| # source this from your shell's profile | |
| # Go Binaries linked to my homedir | |
| export GOROOT=$HOME/.local/usr/local/go | |
| export PATH=$PATH:$GOROOT/bin | |
| # User Binaries | |
| export PATH=$PATH:$HOME/go/bin | |
| # User GOPATH for backwards-compat | |
| export GOPATH=$HOME/go |
| #!/bin/sh | |
| # setup a kinder cluster with the bazel and output directories mounted | |
| set -eu | |
| binary="kubeadm" | |
| kube_root="${kube_root:-${GOPATH:-${HOME}/go}/src/k8s.io/kubernetes}" | |
| bazel_binpath="bazel-bin/cmd/${binary}/linux_amd64_pure_stripped/" | |
| output_binpath="_output/local/bin/linux/amd64/" |
I hereby claim:
To claim this, I am signing this object:
This is a tested example.
Not all clusters will have the metrics API, but this will function for ones that do.
The deployment uses the bitnami/kubectl image.
It runs "get node metrics" in a shell while loop that sleeps.
The Deployment's Pod-template uses a ServiceAccount that is ClusterRoleBound to a ClusterRole permitting the list and get verbs for the Node kind in the metrics.k8s.io API group.
Here's how to reproduce:
| #@ load("@ytt:overlay", "overlay") | |
| #@ def pod_lifecycle_patch(): | |
| spec: | |
| #@overlay/match-child-defaults expects="0+" | |
| containers: | |
| #@overlay/match by=overlay.all | |
| - lifecycle: | |
| #! This "sleep" preStop hook delays the | |
| #! Pod shutdown until after our Ingress |
| #!/bin/sh | |
| set -euxo pipefail | |
| NIX_DIR="${HOME}/.nix" | |
| # install nix-user-chroot binary | |
| # how to test if feature is available: | |
| # unshare --user --pid echo YES | |
| mkdir -p ~/bin/ | |
| wget -O ~/bin/nix-user-chroot \ |