{"action":"created","issue":{"url":"https://api.github.com/repos/aylei/kubectl-debug/issues/2","repository_url":"https://api.github.com/repos/aylei/kubectl-debug","labels_url":"https://api.github.com/repos/aylei/kubectl-debug/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/aylei/kubectl-debug/issues/2/comments","events_url":"https://api.github.com/repos/aylei/kubectl-debug/issues/2/events","html_url":"https://github.com/aylei/kubectl-debug/issues/2","id":393945818,"node_id":"MDU6SXNzdWUzOTM5NDU4MTg=","number":2,"title":"Doesn't work on GKE","user":{"login":"kklin","id":1811185,"node_id":"MDQ6VXNlcjE4MTExODU=","avatar_url":"https://avatars3.githubusercontent.com/u/1811185?v=4","gravatar_id":"","url":"https://api.github.com/users/kklin","html_url":"https://github.com/kklin","followers_url":"https://api.github.com/users/kklin/followers","following_url":"https://api.github.com/users/kklin/following{/other_user}","gists_url":"https://api.github.com/users/kklin/gists{/gist_id}","starred_url":"https://api.github.com/users/kklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kklin/subscriptions","organizations_url":"https://api.github.com/users/kklin/orgs","repos_url":"https://api.github.com/users/kklin/repos","events_url":"https://api.github.com/users/kklin/events{/privacy}","received_events_url":"https://api.github.com/users/kklin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-25T01:50:20Z","updated_at":"2018-12-25T05:31:24Z","closed_at":null,"author_association":"NONE","body":"I got this error when trying this against a GKE cluster:\r\n```\r\n2018/12/24 17:46:28 error loading file  open /Users/kevin/.kube/debug-config: no such file or directory\r\nNo Auth Provider found for name \"gcp\"\r\npanic: runtime error: invalid memory address or nil pointer dereference\r\n[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1b459b8]\r\n\r\ngoroutine 1 [running]:\r\ngithub.com/aylei/kubectl-debug/pkg/plugin.(*DebugOptions).Run(0xc4202621c0, 0x0, 0x0)\r\n        /Users/alei/go/src/github.com/aylei/kubectl-debug/pkg/plugin/cmd.go:193 +0x48\r\ngithub.com/aylei/kubectl-debug/pkg/plugin.NewDebugCmd.func1(0xc420295180, 0xc420322bd0, 0x1, 0x3)\r\n        /Users/alei/go/src/github.com/aylei/kubectl-debug/pkg/plugin/cmd.go:94 +0x134\r\ngithub.com/aylei/kubectl-debug/vendor/github.com/spf13/cobra.(*Command).execute(0xc420295180, 0xc4200d60d0, 0x3, 0x3, 0xc420295180, 0xc4200d60d0)\r\n        /Users/alei/go/src/github.com/aylei/kubectl-debug/vendor/github.com/spf13/cobra/command.go:766 +0x2c1\r\ngithub.com/aylei/kubectl-debug/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc420295180, 0x1e5edf0, 0x1bed6c0, 0x1e5af50)\r\n        /Users/alei/go/src/github.com/aylei/kubectl-debug/vendor/github.com/spf13/cobra/command.go:852 +0x30a\r\ngithub.com/aylei/kubectl-debug/vendor/github.com/spf13/cobra.(*Command).Execute(0xc420295180, 0xc4200dc000, 0x1e64980)\r\n        /Users/alei/go/src/github.com/aylei/kubectl-debug/vendor/github.com/spf13/cobra/command.go:800 +0x2b\r\nmain.main()\r\n        /Users/alei/go/src/github.com/aylei/kubectl-debug/cmd/plugin/main.go:16 +0x112\r\n```\r\n\r\nI've seen this in my own projects before. It'll probably be fixed by importing the auth plugins: https://github.com/kubernetes/client-go/issues/242#issuecomment-314642965."},"comment":{"url":"https://api.github.com/repos/aylei/kubectl-debug/issues/comments/449804354","html_url":"https://github.com/aylei/kubectl-debug/issues/2#issuecomment-449804354","issue_url":"https://api.github.com/repos/aylei/kubectl-debug/issues/2","id":449804354,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTgwNDM1NA==","user":{"login":"kklin","id":1811185,"node_id":"MDQ6VXNlcjE4MTExODU=","avatar_url":"https://avatars3.githubusercontent.com/u/1811185?v=4","gravatar_id":"","url":"https://api.github.com/users/kklin","html_url":"https://github.com/kklin","followers_url":"https://api.github.com/users/kklin/followers","following_url":"https://api.github.com/users/kklin/following{/other_user}","gists_url":"https://api.github.com/users/kklin/gists{/gist_id}","starred_url":"https://api.github.com/users/kklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kklin/subscriptions","organizations_url":"https://api.github.com/users/kklin/orgs","repos_url":"https://api.github.com/users/kklin/repos","events_url":"https://api.github.com/users/kklin/events{/privacy}","received_events_url":"https://api.github.com/users/kklin/received_events","type":"User","site_admin":false},"created_at":"2018-12-25T05:31:24Z","updated_at":"2018-12-25T05:31:24Z","author_association":"NONE","body":"Sure. I took a quick look:  adding the auth plugins fixed the error with parsing the kubeconfig, but it still doesn't work with GKE because the `hostIP` of the `DaemonSet` pods are private:\r\n```\r\nkevin@Kevins-MacBook-Pro-2 kubectl-debug % kubectl debug tiller-deploy-6d95c79967-bqxxc -n kube-system\r\n2018/12/24 21:18:20 error loading file  open /Users/kevin/.kube/debug-config: no such file or directory\r\nerror execute remote, error sending request: Post http://10.128.0.4:10027/api/v1/debug?command=%5B%22bash%22%5D&container=docker%3A%2F%2Fac7e6b66f589204696db611077d6bc4d1d71d0f89835ef555d4b3778b2721728&image=nicolaka%2Fnetshoot%3Alatest: dial tcp 10.128.0.4:10027: connect: operation timed out\r\nerror sending request: Post http://10.128.0.4:10027/api/v1/debug?command=%5B%22bash%22%5D&container=docker%3A%2F%2Fac7e6b66f589204696db611077d6bc4d1d71d0f89835ef555d4b3778b2721728&image=nicolaka%2Fnetshoot%3Alatest: dial tcp 10.128.0.4:10027: connect: operation timed out\r\n```\r\n\r\n```\r\nkevin@Kevins-MacBook-Pro-2 kubectl-debug % kubectl get pod debug-agent-c2shn -o yaml\r\n  ...\r\n\r\n  hostIP: 10.128.0.4\r\n  phase: Running\r\n  podIP: 10.128.0.4\r\n  qosClass: Burstable\r\n  startTime: 2018-12-25T01:46:05Z\r\n```\r\n\r\nI would PR the auth plugin fix, but I couldn't figure out the right way to update `Gopkg.toml`."}}
{"actor":{"display_login":"kklin"}}