Easy Kubernetes setup on Ubuntu with microk8s

To install microk8s, run

Enable rules in firewall

Enable addons

To see status of current addons, run

Here is status for a defaul install

To see all pods/services/deploymens, run

To avoid typing microk8s before kubectl, run

You can add this to .bashrc to make it permanent.

To run an nginx container

To expose the nginx deployment to public, run

Here –external-ip 172.26.0.217 is IP of the node. In this case, it is internal IP of Amazon ec2 sevrer (eth0 IP).

The above expose command create a service

To undo the expose command, you need to delete the service with name nginx.

See Kubernetes

Leave a Reply

Your email address will not be published. Required fields are marked *