Trying to run a one-off container based on this image with command: kubectl run --rm utils -it --image arunvelsriram/utils bash which works but when I try to ping I get:
ping google.com
ping: socket: Operation not permitted
Some solutions to this mention to try running:
setcap cap_net_raw=ep $(which ping)
but then I get error: bash: setcap: command not found If I try installing it I keep running into this error:
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
Is there any image that allows me to ping from kubernetes pod in GKE?
I tried running this and it worked fine, see if you have any additional restrictions on your cluster, that it drops linux capabilities