{"action":"created","issue":{"url":"https://api.github.com/repos/ovh/terraform-ovh-publiccloud-k8s/issues/65","repository_url":"https://api.github.com/repos/ovh/terraform-ovh-publiccloud-k8s","labels_url":"https://api.github.com/repos/ovh/terraform-ovh-publiccloud-k8s/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/ovh/terraform-ovh-publiccloud-k8s/issues/65/comments","events_url":"https://api.github.com/repos/ovh/terraform-ovh-publiccloud-k8s/issues/65/events","html_url":"https://github.com/ovh/terraform-ovh-publiccloud-k8s/issues/65","id":307621408,"number":65,"title":"Cannot get logs","user":{"login":"kartoch","id":160925,"avatar_url":"https://avatars3.githubusercontent.com/u/160925?v=4","gravatar_id":"","url":"https://api.github.com/users/kartoch","html_url":"https://github.com/kartoch","followers_url":"https://api.github.com/users/kartoch/followers","following_url":"https://api.github.com/users/kartoch/following{/other_user}","gists_url":"https://api.github.com/users/kartoch/gists{/gist_id}","starred_url":"https://api.github.com/users/kartoch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kartoch/subscriptions","organizations_url":"https://api.github.com/users/kartoch/orgs","repos_url":"https://api.github.com/users/kartoch/repos","events_url":"https://api.github.com/users/kartoch/events{/privacy}","received_events_url":"https://api.github.com/users/kartoch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-03-22T12:24:52Z","updated_at":"2018-03-22T13:27:17Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Based in commit a73065c0e6f5b7d51cbbe4818258f129a7f24839, kubectl cannot get logs.\r\n\r\nUsing kubectl on the computer which did the provisioning:\r\n\r\n- Access the log of the kube-controller-manager of first master (the remote address set in kubectl configuration):\r\n\r\n```\r\n$ kubectl logs kube-controller-manager-k8s-master-0 --namespace=kube-system                                                                                             \r\nI0322 11:35:10.271991       1 controllermanager.go:108] Version: v1.9.2\r\nI0322 11:35:10.282449       1 leaderelection.go:174] attempting to acquire leader lease...\r\nE0322 11:35:10.283684       1 leaderelection.go:224] error retrieving resource lock kube-system/kube-controller-manager: Get https://217.182.80.247:6443/api/v1/namespaces/kube-system/endpoints/kube-controller-manager: dial tcp 217.182.80.247:6443: getsockopt: connection refused\r\n```\r\n- Access the log of the kube-controller-manager of other masters:\r\n\r\n```\r\n$ kubectl logs kube-controller-manager-k8s-master-1 --namespace=kube-system                                                                                             \r\nError from server: Get https://217.182.80.229:10250/containerLogs/kube-system/kube-controller-manager-k8s-master-1/kube-controller-manager: dial tcp 217.182.80.229:10250: getsockopt: connection timed out\r\n```\r\nSame when using kubectl on one of the Master nodes\r\n\r\n- Access the log of the kube-controller-manager of first master (the remote address set in kubectl configuration):\r\n```\r\ncore@k8s-master-0 ~ $ sudo /opt/k8s/bin/kubectl --kubeconfig=/etc/kubernetes/admin.conf logs kube-controller-manager-k8s-master-0 --namespace=kube-system\r\nI0322 11:35:10.271991       1 controllermanager.go:108] Version: v1.9.2\r\nI0322 11:35:10.282449       1 leaderelection.go:174] attempting to acquire leader lease...\r\nE0322 11:35:10.283684       1 leaderelection.go:224] error retrieving resource lock kube-system/kube-controller-manager: Get https://217.182.80.247:6443/api/v1/namespaces/kube-system/endpoints/kube-controller-manager: dial tcp 217.182.80.247:6443: getsockopt: connection refused\r\n```\r\n- Access the log of the kube-controller-manager of other masters:\r\n\r\n```\r\ncore@k8s-master-0 ~ $ sudo /opt/k8s/bin/kubectl --kubeconfig=/etc/kubernetes/admin.conf logs kube-controller-manager-k8s-master-1 --namespace=kube-system\r\nError from server: Get https://217.182.80.229:10250/containerLogs/kube-system/kube-controller-manager-k8s-master-1/kube-controller-manager: dial tcp 217.182.80.229:10250: getsockopt: connection timed out\r\n```"},"comment":{"url":"https://api.github.com/repos/ovh/terraform-ovh-publiccloud-k8s/issues/comments/375305027","html_url":"https://github.com/ovh/terraform-ovh-publiccloud-k8s/issues/65#issuecomment-375305027","issue_url":"https://api.github.com/repos/ovh/terraform-ovh-publiccloud-k8s/issues/65","id":375305027,"user":{"login":"kartoch","id":160925,"avatar_url":"https://avatars3.githubusercontent.com/u/160925?v=4","gravatar_id":"","url":"https://api.github.com/users/kartoch","html_url":"https://github.com/kartoch","followers_url":"https://api.github.com/users/kartoch/followers","following_url":"https://api.github.com/users/kartoch/following{/other_user}","gists_url":"https://api.github.com/users/kartoch/gists{/gist_id}","starred_url":"https://api.github.com/users/kartoch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kartoch/subscriptions","organizations_url":"https://api.github.com/users/kartoch/orgs","repos_url":"https://api.github.com/users/kartoch/repos","events_url":"https://api.github.com/users/kartoch/events{/privacy}","received_events_url":"https://api.github.com/users/kartoch/received_events","type":"User","site_admin":false},"created_at":"2018-03-22T13:27:17Z","updated_at":"2018-03-22T13:27:17Z","author_association":"CONTRIBUTOR","body":"Found it, communication must be permitted to port 10250 for masters to masters and provisioner to masters.\r\n\r\nIn `main.tf` of the configuration:\r\n\r\n```\r\nresource \"openstack_networking_secgroup_rule_v2\" \"k8s-api\" {\r\n  direction         = \"ingress\"\r\n  ethertype         = \"IPv4\"\r\n  protocol          = \"tcp\"\r\n remote_ip_prefix = \"${data.http.myip.body}/32\"\r\n  port_range_min    = 10250\r\n  port_range_max    = 10250\r\n  security_group_id = \"${module.k8s_secgroups.master_group_id}\"\r\n}\r\n```\r\nin `main.tf` of `k8s-secgroups`:\r\n\r\n```\r\nresource \"openstack_networking_secgroup_rule_v2\" \"kubelet_master_master\" {\r\n  direction         = \"ingress\"\r\n  ethertype         = \"IPv4\"\r\n  protocol          = \"tcp\"\r\n  port_range_min    = 10250\r\n  port_range_max    = 10250\r\n  remote_group_id   = \"${openstack_networking_secgroup_v2.master.id}\"\r\n  security_group_id = \"${openstack_networking_secgroup_v2.master.id}\"\r\n}\r\n\r\n```"}}
{"actor":{"display_login":"kartoch"}}