{"id":925,"date":"2020-02-19T16:20:42","date_gmt":"2020-02-19T14:20:42","guid":{"rendered":"https:\/\/www.rocworks.at\/wordpress\/?p=925"},"modified":"2020-02-19T16:24:37","modified_gmt":"2020-02-19T14:24:37","slug":"microk8s","status":"publish","type":"post","link":"https:\/\/www.rocworks.at\/wordpress\/?p=925","title":{"rendered":"Setup MicroK8S"},"content":{"rendered":"<h2>Install<\/h2>\n<pre><code>Add the following lines to \/etc\/docker\/daemon.json:\n{\n    \"insecure-registries\" : [\"localhost:32000\"]\n}<\/code><\/pre>\n<pre><code>&gt; snap install microk8s --classic --channel=1.17\/stable  \n\n&gt; microk8s.status  \n\n&gt; microk8s.stop  # Stops all MicroK8s services  \n&gt; microk8s.start  # Starts MicroK8s after it is being stopped  <\/code><\/pre>\n<h2>Alias<\/h2>\n<pre><code>&gt; alias kubectl='microk8s.kubectl'  \n&gt; alias k='microk8s.kubectl'  <\/code><\/pre>\n<h2>Status<\/h2>\n<pre><code>&gt; k get all  \n&gt; k get all --all-namespaces\n\n&gt; k cluster-info\n\n&gt; k get pods -o wide<\/code><\/pre>\n<h2>Dashboard<\/h2>\n<pre><code>&gt; microk8s.enable dns dashboard  \n\nGet token for dashboard\n&gt; token=$(microk8s.kubectl -n kube-system get secret | grep default-token | cut -d \" \" -f1)  \n&gt; microk8s.kubectl -n kube-system describe secret $token  <\/code><\/pre>\n<h2>Grafana<\/h2>\n<pre><code>&gt; cluster-info # url for grafana  \n&gt; microk8s.config # username and password  <\/code><\/pre>\n<h2>Enable Helm<\/h2>\n<pre><code>&gt; microk8s.enable helm  \n&gt; microk8s.helm init  <\/code><\/pre>\n<h2>Local Images<\/h2>\n<pre><code>microk8s.ctr image import myimage.tar\nmicrok8s.ctr images ls\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Install Add the following lines to \/etc\/docker\/daemon.json: { &#8220;insecure-registries&#8221; : [&#8220;localhost:32000&#8221;] } &gt; snap install microk8s &#8211;classic &#8211;channel=1.17\/stable &gt; microk8s.status &gt; microk8s.stop # Stops all MicroK8s services &gt; microk8s.start # Starts MicroK8s after it is being stopped Alias &gt; alias kubectl=&#8217;microk8s.kubectl&#8217; &gt; alias k=&#8217;microk8s.kubectl&#8217; Status &gt; k get all &gt; k get all &#8211;all-namespaces &gt; &hellip; <a href=\"https:\/\/www.rocworks.at\/wordpress\/?p=925\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Setup MicroK8S<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-925","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=925"}],"version-history":[{"count":2,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/925\/revisions"}],"predecessor-version":[{"id":928,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/925\/revisions\/928"}],"wp:attachment":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}