Skip to content

Instantly share code, notes, and snippets.

@BenjaminHerbert
Last active October 18, 2021 15:53
Show Gist options
  • Save BenjaminHerbert/67f9200565fa3720c97dd367b1095543 to your computer and use it in GitHub Desktop.
Save BenjaminHerbert/67f9200565fa3720c97dd367b1095543 to your computer and use it in GitHub Desktop.
Kubernetes-Kram

JWT Token zerlegen

kubectl config view --minify -o json | jq -r '.users[0].user."auth-provider".config."id-token"' | tr '.' '\n' |  head -2 | tail -1 | base64 -d | jq '.'

Azure AKS-Token zerlegen

kubectl config view --minify -o json | jq -r '.users[0].user."auth-provider".config."access-token"' | tr '.' '\n' |  head -2 | tail -1 | base64 -d | jq '.'

Image Pull Secrets

kubectl -n namespace-xxx run bhe-debug -i -t --rm --image=xxx/image:version --restart=Never --overrides='{ "apiVersion":"v1", "spec": { "imagePullSecrets": [{"name":"xxx.yyy.io"}] }}' /bin/bash

Cert-Manager - Probleme auflisten

kubectl  get challenges.acme.cert-manager.io -o json -A | jq '.items[] | select(.status.state=="pending") | { name:.metadata.name, namespace:.metadata.namespace,reason:.status.reason}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment