Skip to content

Instantly share code, notes, and snippets.

@hamishforbes
Last active June 25, 2020 15:19
Show Gist options
  • Save hamishforbes/be905a01f8208e7bb2f70b90e800ddbd to your computer and use it in GitHub Desktop.
Save hamishforbes/be905a01f8208e7bb2f70b90e800ddbd to your computer and use it in GitHub Desktop.
hamish@Hamish-MBP ~/b/k8s> kubectl -n test get pod tailscale-test1 -ojson | jq .spec.containers[0].securityContext
{
"capabilities": {
"add": [
"NET_ADMIN"
]
}
}
hamish@Hamish-MBP ~/b/k8s> kubectl -n test get pod tailscale-test2 -ojson | jq .spec.containers[0].securityContext
{
"privileged": true
}
hamish@Hamish-MBP ~/b/k8s> kubectl -n test exec -it tailscale-test1 -- tailscaled
2020/06/25 15:11:40 logpolicy.Read /root/.cache/Tailscale/tailscaled.log.conf: open /root/.cache/Tailscale/tailscaled.log.conf: no such file or directory
logtail started
Program starting: v0.99.1-127-g42368054, Go 1.14.4-ts56db765: []string{"tailscaled"}
LogID: 7d478e11e8ebf4658039383b18c874224b3efddc850eb28cb2b24a490eeae7cd
3.0M/19.1M Starting userspace wireguard engine with tun device "tailscale0"
3.1M/19.1M Linux kernel version: 4.14.173-137.229.amzn2.x86_64
3.1M/19.1M is CONFIG_TUN enabled in your kernel? `modprobe tun` failed with: modprobe: can't change directory to '/lib/modules': No such file or directory
3.1M/19.1M CreateTUN: can't create TUN device; /dev/net/tun does not exist
wgengine.New: can't create TUN device; /dev/net/tun does not exist
command terminated with exit code 1
hamish@Hamish-MBP ~/b/k8s> kubectl -n test exec -it tailscale-test2 -- tailscaled
2020/06/25 15:11:45 logpolicy.Read /root/.cache/Tailscale/tailscaled.log.conf: open /root/.cache/Tailscale/tailscaled.log.conf: no such file or directory
logtail started
Program starting: v0.99.1-127-g42368054, Go 1.14.4-ts56db765: []string{"tailscaled"}
LogID: c4c66dcf4be435dc8154acb7f06b55a1e24f1ecf7eed4be2f944f0309099e536
2.9M/19.1M Starting userspace wireguard engine with tun device "tailscale0"
3.1M/19.1M CreateTUN ok.
hamish@Hamish-MBP ~/b/k8s> kubectl -n test exec -it tailscale-test1 -- ls -lah /dev/net
ls: /dev/net: No such file or directory
command terminated with exit code 1
hamish@Hamish-MBP ~/b/k8s> kubectl -n test exec -it tailscale-test2 -- ls -lah /dev/net
total 0
drwxr-xr-x 2 root root 60 Jun 25 15:08 .
drwxr-xr-x 10 root root 2.7K Jun 25 15:08 ..
crw-rw-rw- 1 root root 10, 200 Jun 25 15:08 tun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment