{"id":5629,"date":"2019-10-01T13:51:02","date_gmt":"2019-10-01T18:51:02","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=5629"},"modified":"2019-10-01T14:05:33","modified_gmt":"2019-10-01T19:05:33","slug":"docker-for-windows-using-built-in-k8s","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=5629","title":{"rendered":"Docker for Windows: Using Built-in k8s"},"content":{"rendered":"<p>I just started using k8s built into Docker for Windows, but I couldn&#8217;t connect because the target machine actively refused the connection.<\/p>\n<pre>C:\\Users\\lisa&gt;kubectl version\r\nClient Version: version.Info{Major:\"1\", Minor:\"14\", GitVersion:\"v1.14.6\", GitCommit:\"96fac5cd13a5dc064f7d9f4f23030a6aeface6cc\", GitTreeState:\"clean\", BuildDate:\"2019-08-19T11:13:49Z\", GoVersion:\"go1.12.9\", Compiler:\"gc\", Platform:\"windows\/amd64\"}\r\nUnable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.<\/pre>\n<p>No idea &#8212; it&#8217;s all internal traffic, but I resorted to turning off my firewall anyway just to see what would happen. Nothing. Turns out I need a KUBECONFIG environment variable pointing to the config file<\/p>\n<pre>C:\\Users\\lisa&gt;set | grep KUB\r\nKUBECONFIG=C:\\Users\\lisa.RUSHWORTH.000\\.kube\\config<\/pre>\n<p>Applied the yaml file and started the proxy<\/p>\n<pre>C:\\Users\\lisa&gt;kubectl apply -f https:\/\/raw.githubusercontent.com\/kubernetes\/dashboard\/v1.10.1\/src\/deploy\/recommended\/kubernetes-dashboard.yaml\r\nsecret\/kubernetes-dashboard-certs created\r\nserviceaccount\/kubernetes-dashboard created\r\nrole.rbac.authorization.k8s.io\/kubernetes-dashboard-minimal created\r\nrolebinding.rbac.authorization.k8s.io\/kubernetes-dashboard-minimal created\r\ndeployment.apps\/kubernetes-dashboard created\r\nservice\/kubernetes-dashboard created\r\n\r\nC:\\Users\\lisa&gt;kubectl proxy\r\nStarting to serve on 127.0.0.1:8001<\/pre>\n<p>Working! Get the token from<\/p>\n<pre>kubectl -n kube-system describe secret default<\/pre>\n<p>And access the dashboard.<\/p>\n<p>&nbsp;<\/p>\n<p>A reminder for myself &#8212; the totally <em>not<\/em> obvious package name for the kubeadm binary on the CHANGELOG link list is Node. Go figure!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just started using k8s built into Docker for Windows, but I couldn&#8217;t connect because the target machine actively refused the connection. C:\\Users\\lisa&gt;kubectl version Client Version: version.Info{Major:&#8221;1&#8243;, Minor:&#8221;14&#8243;, GitVersion:&#8221;v1.14.6&#8243;, GitCommit:&#8221;96fac5cd13a5dc064f7d9f4f23030a6aeface6cc&#8221;, GitTreeState:&#8221;clean&#8221;, BuildDate:&#8221;2019-08-19T11:13:49Z&#8221;, GoVersion:&#8221;go1.12.9&#8243;, Compiler:&#8221;gc&#8221;, Platform:&#8221;windows\/amd64&#8243;} Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[623],"tags":[231,615],"class_list":["post-5629","post","type-post","status-publish","format-standard","hentry","category-containerized-development-and-deployment","tag-docker","tag-kubernetes"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5629"}],"version-history":[{"count":3,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5629\/revisions"}],"predecessor-version":[{"id":5632,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5629\/revisions\/5632"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}