eldadru / ksniff

Kubectl plugin to ease sniffing on kubernetes pods using tcpdump and wireshark
Apache License 2.0
3.13k stars 186 forks source link

In openshift 4.7 and higher we are unable to run oc sniff when namespaces have quotas enabled #153

Closed sandeep223 closed 1 year ago

sandeep223 commented 1 year ago

oc sniff eric-pc-sm-http-client-7b55578d4b-m272q -n richtxvzwcsmf-y-ec-x-001 -o test.pcap -i any -p INFO[0000] no container specified, taking first container we found in pod. INFO[0000] selected container: 'http-client' INFO[0000] sniffing method: privileged pod INFO[0000] sniffing on pod: 'eric-pc-sm-http-client-7b55578d4b-m272q' [namespace: 'richtxvzwcsmf-y-ec-x-001', container: 'http-client', filter: '', interface: 'any'] INFO[0000] creating privileged pod on node: 'worker-27' ERRO[0000] failed to create privileged pod on node: 'worker-27' error="pods \"ksniff-gk2gd\" is forbidden: failed quota: richtxvzwcsmf-y-ec-x-001-quota: must specify limits.cpu,limits.memory,requests.cpu,requests.memory" Error: pods "ksniff-gk2gd" is forbidden: failed quota: richtxvzwcsmf-y-ec-x-001-quota: must specify limits.cpu,limits.memory,requests.cpu,requests.memory

sandeep223 commented 1 year ago

Once we remove the quotas associated with namespace we we can generate the trace