Following twitter thread about running kube-web-view in k8spin: https://twitter.com/AngelBarrera92/status/1162649686588690437?s=20
- Get a VM
- Install Docker
curl -sSL https://get.docker.com/ | sh
- Install gvisor (following official guide https://gvisor.dev/docs/user_guide/docker/#install-gvisor)
3.1 Run the following script
3.2 Add this configuration to "( set -e wget https://storage.googleapis.com/gvisor/releases/nightly/latest/runsc wget https://storage.googleapis.com/gvisor/releases/nightly/latest/runsc.sha512 sha512sum -c runsc.sha512 sudo mv runsc /usr/local/bin sudo chown root:root /usr/local/bin/runsc chmod 0755 /usr/local/bin/runsc )
/etc/docker/daemon.json
"
3.3 Restart Docker{ "runtimes": { "runsc": { "path": "/usr/local/bin/runsc" } } }
- Run a shell in kube-web-view image
4.1 with gVisor
4.2 without gVisordocker run -it -u $(id -u) -v $PWD/kubeconfig.json:/root/.kube/config --cpus="0.1" --runtime=runsc --entrypoint bash hjacobs/kube-web-view
docker run -it -u $(id -u) -v $PWD/kubeconfig.json:/root/.kube/config --cpus="0.1" --entrypoint bash hjacobs/kube-web-view
- Execute the following commands on each container
5.1 Install "
strace
"
5.2 Get a sys call summaryapt update -qq && apt install -qqy strace
5.3 Get a full sys call dumptime strace -c -w -S name /usr/local/bin/python -m kube_web --help
time strace -o dump -ff /usr/local/bin/python -m kube_web --help