Command line tool (kubectl) | Kubernetes

PHOTO EMBED

Fri May 31 2024 22:23:29 GMT+0000 (Coordinated Universal Time)

Saved by @calazar23

#!/bin/bash



# this plugin makes use of the `kubectl config` command in order to output

# information about the current user, based on the currently selected context

kubectl config view --template='{{ range .contexts }}{{ if eq .name "'$(kubectl config current-context)'" }}Current user: {{ printf "%s\n" .context.user }}{{ end }}{{ end }}'
content_copyCOPY

https://kubernetes.io/docs/reference/kubectl/