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