scale : Horizontally scale a controller to add or remove Pods by updating the replica count of the controller.
annotate : Add or remove an annotation from an object.
label : Add or remove a label from an object.
set <field> : Set an aspect of an object.
edit : Directly edit the raw configuration of a live object by opening its configuration in an editor.
patch : Directly modify specific fields of a live object by using a patch string. For more details on patch strings, see the patch section in API Conventions.
apiVersion: apiserver.config.k8s.io/v1 # see compatibility note
kind: AdmissionConfiguration
plugins:
- name: PodSecurity
configuration:
apiVersion: pod-security.admission.config.k8s.io/v1
kind: PodSecurityConfiguration
# Defaults applied when a mode label is not set.
#
# Level label values must be one of:
# - "privileged" (default)
# - "baseline"
# - "restricted"
#
# Version label values must be one of:
# - "latest" (default)
# - specific version like "v1.27"
defaults:
enforce: "privileged"
enforce-version: "latest"
audit: "privileged"
audit-version: "latest"
warn: "privileged"
warn-version: "latest"
exemptions:
# Array of authenticated usernames to exempt.
usernames: []
# Array of runtime class names to exempt.
runtimeClasses: []
# Array of namespaces to exempt.
namespaces: []
# install via go
$ go install github.com/hidetatz/kubecolor/cmd/kubecolor@latest
# or
$ go get -u github.com/hidetatz/kubecolor/cmd/kubecolor
# brew
$ brew install hidetatz/tap/kubecolor
# autocomplete
$ cat >> ~/.bashrc << EOF
alias k='kubecolor '
alias kubectl='kubecolor '
alias kc='kubecolor -n kube-system'
complete -o default -F __start_kubectl kubecolor
while read -r _i; do
complete -o default -F __start_kubectl "${_i}"
done < <(alias | sed -rn "s:^alias.(.+)=.kubec.+.$:\1:p)
EOF