mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2025-01-21 10:36:47 +00:00
[.zshrc] Update knodes function
This commit is contained in:
parent
6ba0c5d93a
commit
722a32eb47
6
.zshrc
6
.zshrc
@ -91,15 +91,19 @@ kexec () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
knodes () {
|
knodes () {
|
||||||
|
{
|
||||||
|
echo -e "Name\tType\tNodePool\tNodeClass\tCapacity\tRegistered\tInitialized"
|
||||||
kubectl get node -o json \
|
kubectl get node -o json \
|
||||||
| jq -r '.items[] | {
|
| jq -r '.items[] | {
|
||||||
name:.metadata.name,
|
name:.metadata.name,
|
||||||
type:.metadata.labels."beta.kubernetes.io/instance-type",
|
type:.metadata.labels."beta.kubernetes.io/instance-type",
|
||||||
karpenter:.metadata.labels."karpenter.sh/nodepool",
|
karpenter:.metadata.labels."karpenter.sh/nodepool",
|
||||||
|
nodeclass:.metadata.labels."eks.amazonaws.com/nodeclass",
|
||||||
capacity:.metadata.labels."karpenter.sh/capacity-type",
|
capacity:.metadata.labels."karpenter.sh/capacity-type",
|
||||||
registered:.metadata.labels."karpenter.sh/registered",
|
registered:.metadata.labels."karpenter.sh/registered",
|
||||||
initialized:.metadata.labels."karpenter.sh/initialized",
|
initialized:.metadata.labels."karpenter.sh/initialized",
|
||||||
} | [.name,.type,.karpenter,.capacity,.registered,.initialized] | @tsv'
|
} | [.name,.type,.karpenter,.nodeclass,.capacity,.registered,.initialized] | @tsv'
|
||||||
|
} | column -t
|
||||||
}
|
}
|
||||||
|
|
||||||
kpretty () {
|
kpretty () {
|
||||||
|
Loading…
Reference in New Issue
Block a user