How to setup UFW to allow local Kubernetes ?

How to setup UFW to allow local Kubernetes ?


Hello, I am currently trying to learn Kubernetes and decided to give a try to microk8s. The problem is that I am stuck because my UFW rules are blocking microk8s. I am using a fresh install of Ubuntu 20.04. Bellow are the command I used to setup a VPN kill-switch (Followed this guide:…12b2d90d0cded2) Code: sudo ufw default deny outgoing sudo ufw default deny incoming sudo ufw allow out on tun0 from any to any sudo ufw allow out 1198/udp sudo ufw allow in 1198/udp Right after that, I did install microk8s via snap, install the dashboard and see what is the ip of the dashboard: Code: sudo snap install microk8s –classic –channel=1.18/stable microk8s enable dashboard dns kubectl get all –all-namespaces When I open Firefox to access the dashboard via the IP I see in the output (, it is unable to load the page: “Unable to connect”. I thought the problem must be coming from UFW, so I did temporarily disable the firewall and tried to access the page. Without the firewall enabled, it works fine, I can access the dashboard. Right after that I did some research, I found some post about similar issues. It seems that I should unblock a few ports for Kubernetes, and I did add these rules: Code: $ sudo ufw allow 179/tcp $ sudo ufw allow 4789/tcp $ sudo ufw allow 5473/tcp $ sudo ufw allow 443/tcp $ sudo ufw allow 6443/tcp $ sudo ufw allow 2379/tcp $ sudo ufw allow 4149/tcp $ sudo ufw allow 10250/tcp $ sudo ufw allow 10255/tcp $ sudo ufw allow 10256/tcp $ sudo ufw allow 9099/tcp But that did not help, I am still unable to access the dashboard page if the firewall is active. I also tried adding this rules, but it doesn’t seems to help…


Previous [ubuntu] GPU Fan curve not increasing until GPU hits max temp
Next Is my laptop compatible with ubuntu???

About author

You might also like

Ubuntu Dsicussions 0 Comments

[ubuntu] Updated ubuntu 18.04 to 20.04. no dock?

I updated my ubuntu 18.04 to 20.04. The dock showed up for a few seconds and then disappeared. To get on line I clicked the windows button and at the

Ubuntu Dsicussions 0 Comments

Desktop icons remain hi-lighted/lit/on?

Now using 20.04 As title, DT icons remain hi-lighted until either another icon or a blank space on the DT is clicked on, similar to a folder ! Is this

Ubuntu Dsicussions 0 Comments

Software Updates Broken

I just upgraded to 20.04 on Dell Vostro 1510 laptop Tried to install wine and an application but things have gone wrong!Software won’t update from Software updater and I can’t


No Comments Yet!

You can be first to comment this post!

Leave a Reply