INNER CODE UNIT · Go
CheckRootPermissions
we-dcode/kubetunnel · pkg/kubetunnel.go:117
func CheckRootPermissions() error {
hasRoot, err := utils.CheckRoot()
if !hasRoot {
log.Errorf(`
This program requires superuser privileges to run. These
privileges are required to add IP address aliases to your
loopback interface. Superuser privileges are also needed
to listen on low port numbers for these IP addresses.
Try:
- sudo -E kubetunnel (Unix)
- Running a shell with administrator rights (Windows)
`)
if err != nil {
return fmt.Errorf("root check failure: %s", err.Error())