{"id":76008,"date":"2024-05-05T19:41:03","date_gmt":"2024-05-05T23:41:03","guid":{"rendered":"http:\/\/bangla.sitestree.com\/microk8s-commands-in-ubuntu\/"},"modified":"2024-05-05T19:41:03","modified_gmt":"2024-05-05T23:41:03","slug":"microk8s-commands-in-ubuntu","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=76008","title":{"rendered":"MicroK8s Commands in Ubuntu"},"content":{"rendered":"<p>MicroK8s Commands in Ubuntu<br \/>\n(- &#8211; use double hyphen)<\/p>\n<p>Install<br \/>\nsudo snap install microk8s &#8211; -classic<br \/>\nsudo snap install microk8s &#8211; -classic &#8211; -channel=1.25\/stable<\/p>\n<p>Allow Through: Firwall<br \/>\nsudo ufw allow in on cni0 &amp;&amp; sudo ufw allow out on cni0<br \/>\nsudo ufw default allow routed<\/p>\n<p>Enable Add Ons<br \/>\nmicrok8s enable dns<br \/>\nmicrok8s enable dashboard<br \/>\nmicrok8s enable storage<\/p>\n<p>You can disable when you need<br \/>\nmicrok8s disable dns<br \/>\nmicrok8s disable dashboard<br \/>\nmicrok8s disable storage<\/p>\n<p>Kubernetes Dashboard<br \/>\nmicrok8s kubectl get all &#8211; -all-namespaces<\/p>\n<p>Retrieve Token<br \/>\ntoken=$(microk8s kubectl -n kube-system get secret | grep default-token | cut -d &quot; &quot; -f1)<br \/>\nmicrok8s kubectl -n kube-system describe secret $token<\/p>\n<p>Host your service in Kubernetes<br \/>\nmicrok8s kubectl create deployment microbot &#8211; -image=dontrebootme\/microbot:v1<br \/>\nmicrok8s kubectl scale deployment microbot &#8211; -replicas=2<\/p>\n<p>Create service<br \/>\nmicrok8s kubectl expose deployment microbot &#8211; -type=NodePort &#8211; -port=80 &#8211; -name=microbot-service<\/p>\n<p>Check cluster after a few minutes<br \/>\nmicrok8s kubectl get all &#8211; -all-namespaces<\/p>\n<p>Misc Commands<br \/>\nmicrok8s status<br \/>\nmicrok8s enable<br \/>\nmicrok8s disable<br \/>\nmicrok8s kubectl<br \/>\nmicrok8s config<br \/>\nmicrok8s istioctl<br \/>\nmicrok8s inspect<br \/>\nmicrok8s reset<br \/>\nmicrok8s stop<br \/>\nmicrok8s start<\/p>\n<p>Ref: <a href=\"https:\/\/ubuntu.com\/tutorials\/install-a-local-kubernetes-with-microk8s#1-overview\">https:\/\/ubuntu.com\/tutorials\/install-a-local-kubernetes-with-microk8s#1-overview<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>MicroK8s Commands in Ubuntu (- &#8211; use double hyphen) Install sudo snap install microk8s &#8211; -classic sudo snap install microk8s &#8211; -classic &#8211; -channel=1.25\/stable Allow Through: Firwall sudo ufw allow in on cni0 &amp;&amp; sudo ufw allow out on cni0 sudo ufw default allow routed Enable Add Ons microk8s enable dns microk8s enable dashboard microk8s &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=76008\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[182],"tags":[],"class_list":["post-76008","post","type-post","status-publish","format-standard","hentry","category---blog","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":78519,"url":"http:\/\/bangla.sitestree.com\/?p=78519","url_meta":{"origin":76008,"position":0},"title":"Step by step DNS Server installation in ubuntu in a fresh VM","author":"Author-Check- Article-or-Video","date":"September 28, 2025","format":false,"excerpt":"\"Nice \u2014 below is a complete, step-by-step, blog-ready guide to install and configure a simple authoritative + optional recursive BIND9 DNS server on a fresh Ubuntu VM. It\u2019s copyright-free and ready to paste into your notes or blog. Notes before you begin\u2022 This guide assumes Ubuntu 22.04 \/ 24.04 (netplan-based).\u2022\u2026","rel":"","context":"In &quot;Computer Networks&quot;","block_context":{"text":"Computer Networks","link":"http:\/\/bangla.sitestree.com\/?cat=1978"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78613,"url":"http:\/\/bangla.sitestree.com\/?p=78613","url_meta":{"origin":76008,"position":1},"title":"Using Let\u2019s Encrypt With Apache2 (HTTPS Setup)","author":"Author-Check- Article-or-Video","date":"November 25, 2025","format":false,"excerpt":"By ChatGPT as is: Below is a clear step-by-step guide to using Let\u2019s Encrypt (free SSL) with Apache2.This assumes you already have a domain pointing to your server\u2019s public IP. \u2705 Using Let\u2019s Encrypt With Apache2 (HTTPS Setup) Method: Certbot (recommended) Let\u2019s Encrypt issues FREE SSL certificates, automated and trusted\u2026","rel":"","context":"In &quot;Computer Networks&quot;","block_context":{"text":"Computer Networks","link":"http:\/\/bangla.sitestree.com\/?cat=1978"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78403,"url":"http:\/\/bangla.sitestree.com\/?p=78403","url_meta":{"origin":76008,"position":2},"title":"How to install a DHCP Server in Ubuntu:","author":"Sayed","date":"August 27, 2025","format":false,"excerpt":"How to install a DHCP Server in Ubuntu: Use these commands and steps in sequence: # Make sure you have an IP address. # If not, please assign an IP address (you can use netplan) # see the next section how to assign an IP address. sudo apt update &&\u2026","rel":"","context":"In &quot;Computer Networks&quot;","block_context":{"text":"Computer Networks","link":"http:\/\/bangla.sitestree.com\/?cat=1978"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/08\/image-15.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":21831,"url":"http:\/\/bangla.sitestree.com\/?p=21831","url_meta":{"origin":76008,"position":3},"title":"Some Ubuntu Linux Commands used in AWS platform #Unix\/Linux #RHCSA","author":"Author-Check- Article-or-Video","date":"March 7, 2021","format":false,"excerpt":"Some Ubuntu Linux Commands used in AWS platform Some might be run by the parent commands This is kinda cleaned up from .bash_history (removed repeating and sensitive commands), still not perfectly cleaned up - so you will see lots of ls, cd, dir or similar \u00a0 sudo apt-get update sudo\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":23379,"url":"http:\/\/bangla.sitestree.com\/?p=23379","url_meta":{"origin":76008,"position":4},"title":"AWS Misc Stuff #Root #By Sayed Ahmed","author":"Author-Check- Article-or-Video","date":"March 30, 2021","format":false,"excerpt":"To install more software in Amazon Linux Instance After you create an instance based on Amazon Linux, you can use the Linux commands as provided in the URL to install more tools for your development. Actually, the commands are for Fedora Linux http:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/install-LAMP.html The steps work like charm. One note\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14846,"url":"http:\/\/bangla.sitestree.com\/?p=14846","url_meta":{"origin":76008,"position":5},"title":"Learn some CentOS Linux : Redhat Linux","author":"Sayed","date":"June 29, 2019","format":false,"excerpt":"This is mostly about Centos Linux. However, this also shows commands related to how to install Magento 2 on LEMP (E for Nginx Web-server). Some PHP related stuff are there as well. LEMP + CentOS + Magento 2 : VM Image or one click install: I did not see readily\u2026","rel":"","context":"In &quot;Magento 2&quot;","block_context":{"text":"Magento 2","link":"http:\/\/bangla.sitestree.com\/?cat=1907"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=76008"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76008\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=76008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=76008"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=76008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}