mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 16:06:51 +00:00
Add a short -n for kubectl's --namespace
fixes #24078 --namespace is a very common flag for nearly every kubectl command we have. We should claim -n for it.
This commit is contained in:
@@ -1349,6 +1349,8 @@ __EOF__
|
||||
kubectl create "${kube_flags[@]}" --namespace=other -f docs/admin/limitrange/valid-pod.yaml
|
||||
# Post-condition: valid-pod POD is created
|
||||
kube::test::get_object_assert 'pods --namespace=other' "{{range.items}}{{$id_field}}:{{end}}" 'valid-pod:'
|
||||
# Post-condition: verify shorthand `-n other` has the same results as `--namespace=other`
|
||||
kube::test::get_object_assert 'pods -n other' "{{range.items}}{{$id_field}}:{{end}}" 'valid-pod:'
|
||||
|
||||
### Delete POD valid-pod in specific namespace
|
||||
# Pre-condition: valid-pod POD exists
|
||||
|
||||
Reference in New Issue
Block a user