Common k8s Related Commands
Getting into a cluster
This following shows how to run a bash shell in
a k8s cluster. Then, download amicontained
to see
all the system calls. Note, you may need to install
curl or wget first…
kubectl run shell --rm -i --tty --image ubuntu -- bash
cd /tmp
wget https://github.com/genuinetools/amicontained/releases/download/v0.4.7/amicontained-linux-amd64; chmod 555 amicontained-linux-amd64; ./amicontained-linux-amd64
Here’s the example output…
Container Runtime: kube
Has Namespaces:
pid: true
user: false
AppArmor Profile: unconfined
Capabilities:
BOUNDING -> chown dac_override fowner fsetid kill setgid setuid setpcap net_bind_service net_raw sys_chroot mknod audit_write setfcap
Seccomp: disabled
Blocked Syscalls (21):
MSGRCV SYSLOG SETSID VHANGUP PIVOT_ROOT ACCT SETTIMEOFDAY UMOUNT2 SWAPON SWAPOFF REBOOT SETHOSTNAME SETDOMAINNAME INIT_MODULE DELETE_MODULE LOOKUP_DCOOKIE KEXEC_LOAD PERF_EVENT_OPEN FANOTIFY_INIT OPEN_BY_HANDLE_AT FINIT_MODULE