You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow a wildcard (* OR %) for long podnames for those who do not like to do copy/paste
Here is my example i am talking about:
I only have two pods, but they have long names. Instead of doing copy/paste of the whole podname, I would like
to have to get the whole name by using a wild card-
Here is my scenerio
++++++++++++
[sysadmin@localhost mp_k8s_exercise]$ kubectl get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
helloworld-cc47658f5-zs9nq 1/1 Running 0 17d 10.1.102.152 localhost.localdomain
nginx-webserver-7fc8bbdbb7-twmhg 1/1 Running 0 18d 10.1.102.148 localhost.localdomain
[sysadmin@localhost mp_k8s_exercise]$
[sysadmin@localhost mp_k8s_exercise]$
[sysadmin@localhost mp_k8s_exercise]$ kubectl exec nginx* -- cat /etc/hosts
Error from server (NotFound): pods "nginx*" not found
[sysadmin@localhost mp_k8s_exercise]$
[sysadmin@localhost mp_k8s_exercise]$ kubectl exec nginx-webserver-* -- cat /etc/hosts
Error from server (NotFound): pods "nginx-webserver-*" not found
[sysadmin@localhost mp_k8s_exercise]$
[sysadmin@localhost mp_k8s_exercise]$ kubectl exec nginx-webserver-7fc8bbdbb7-twmhg -- cat /etc/hosts
What I would have liked to see is if i could what i was trying to do earlier:
[sysadmin@localhost mp_k8s_exercise]$ kubectl exec nginx* -- cat /etc/hosts (* for all chars following nginx*) (% for single char )
Error from server (NotFound): pods "nginx*" not found
[sysadmin@localhost mp_k8s_exercise]$
[sysadmin@localhost mp_k8s_exercise]$ kubectl exec nginx-webserver-* -- cat /etc/hosts
Error from server (NotFound): pods "nginx-webserver-*" not found
[sysadmin@localhost mp_k8s_exercise]$
I should be able to use a wild card like (* for all chars - and % for single char) to get the rest of the podname -
As far as there is no conflict, kubectl should be able to give me and identify long podnames by using wildcard.
I believe this will be beneficial to all kubectl users - not just me who is not always comfortable doing copy/paste.
I hope this reaches to the right team.
Regards
MPattani
The text was updated successfully, but these errors were encountered:
There are no sig labels on this issue. Please add an appropriate label by using one of the following commands:
/sig <group-name>
/wg <group-name>
/committee <group-name>
Please see the group list for a listing of the SIGs, working groups, and committees available.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
Enhancement Description
Allow a wildcard (* OR %) for long podnames for those who do not like to do copy/paste
Here is my example i am talking about:
I only have two pods, but they have long names. Instead of doing copy/paste of the whole podname, I would like
to have to get the whole name by using a wild card-
Here is my scenerio
++++++++++++
[sysadmin@localhost mp_k8s_exercise]$ kubectl get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
helloworld-cc47658f5-zs9nq 1/1 Running 0 17d 10.1.102.152 localhost.localdomain
nginx-webserver-7fc8bbdbb7-twmhg 1/1 Running 0 18d 10.1.102.148 localhost.localdomain
[sysadmin@localhost mp_k8s_exercise]$
[sysadmin@localhost mp_k8s_exercise]$
[sysadmin@localhost mp_k8s_exercise]$ kubectl exec nginx* -- cat /etc/hosts
Error from server (NotFound): pods "nginx*" not found
[sysadmin@localhost mp_k8s_exercise]$
[sysadmin@localhost mp_k8s_exercise]$ kubectl exec nginx-webserver-* -- cat /etc/hosts
Error from server (NotFound): pods "nginx-webserver-*" not found
[sysadmin@localhost mp_k8s_exercise]$
[sysadmin@localhost mp_k8s_exercise]$ kubectl exec nginx-webserver-7fc8bbdbb7-twmhg -- cat /etc/hosts
Kubernetes-managed hosts file.
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
fe00::0 ip6-mcastprefix
fe00::1 ip6-allnodes
fe00::2 ip6-allrouters
10.1.102.148 nginx-webserver-7fc8bbdbb7-twmhg
[sysadmin@localhost mp_k8s_exercise]$ pwd
/home/sysadmin/mp_k8s_exercise
[sysadmin@localhost mp_k8s_exercise]$
+++++++++++++
What I would have liked to see is if i could what i was trying to do earlier:
[sysadmin@localhost mp_k8s_exercise]$ kubectl exec nginx* -- cat /etc/hosts (* for all chars following nginx*) (% for single char )
Error from server (NotFound): pods "nginx*" not found
[sysadmin@localhost mp_k8s_exercise]$
[sysadmin@localhost mp_k8s_exercise]$ kubectl exec nginx-webserver-* -- cat /etc/hosts
Error from server (NotFound): pods "nginx-webserver-*" not found
[sysadmin@localhost mp_k8s_exercise]$
I should be able to use a wild card like (* for all chars - and % for single char) to get the rest of the podname -
As far as there is no conflict, kubectl should be able to give me and identify long podnames by using wildcard.
I believe this will be beneficial to all kubectl users - not just me who is not always comfortable doing copy/paste.
I hope this reaches to the right team.
Regards
MPattani
The text was updated successfully, but these errors were encountered: