大量更新
This commit is contained in:
10
998-常用脚本/c-k8s常用脚本/获取类型为NodePort的Service.sh
Normal file
10
998-常用脚本/c-k8s常用脚本/获取类型为NodePort的Service.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
|
||||
kubectl get svc -A -o json | jq -r '
|
||||
.items[]
|
||||
| select(.spec.type=="NodePort")
|
||||
| .metadata.namespace as $ns
|
||||
| .metadata.name as $name
|
||||
| .spec.ports[]
|
||||
| [$ns, $name, .port, .nodePort]
|
||||
| @tsv' | column -t
|
||||
Reference in New Issue
Block a user