Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Minimalistic Kubernetes apps with Microk8s
Andrii Maliuta
Andrii Maliuta

Posted on

     

Minimalistic Kubernetes apps with Microk8s

When I first started to learn Kubernetes, I tries to figured out how to start quickly and with minimal efforts for bootstrap. At that time I did not find guides how to use K8s locally on own server or in VPS and not in SAAS.

So, the options to use K8s in simple way are:

  • Install K8s modules (kubectl, apis, proxy, etc.) manually
  • Minikube
  • Kind
  • Kubeadm
  • Microk8s

Official guide of K8s tools options -https://kubernetes.io/docs/tasks/tools/

All options are good and have nice tooling, but today I will describe using microk8s (https://microk8s.io/). For me it was the simplest way to bootstrap the environment with app running in K8s.

Installation

I will describe use of K8s in Ubuntu OS, but it is easy to use it in most other OS you like.

The simplest way is to use SNAP:

  1. Install microk8s
    $ sudo snap install microk8s --classic --channel=1.24

  2. Configure permissions:

sudousermod-a-G microk8s$USERsudo chown-f-R$USER ~/.kube
Enter fullscreen modeExit fullscreen mode
  1. Check for successful installation:microk8s status --wait-ready

Addons

Microk8s has a nice ecosystem of addons that help to minimize manual configuration of APIs. Full list of add-ons:
https://microk8s.io/docs/addons#heading--list

We will use:

  • microk8s enable dns - for communication with outer world
  • microk8s enable dashboard - for use of UI

That's it!

You can use usual kubectl commands:

microk8s kubectl get all
microk8s kubcectl get pods

Also, you can check, start and stop service:

  • microk8s stop
  • microk8s start
  • microk8s status

Full list of commands:https://microk8s.io/docs/command-reference

Further I will write how to deploy Spring, Go or other apps in microk8s and VPS.

Thank you for reading!

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Java Developerhttps://linktr.ee/andmalhttps://www.linkedin.com/in/andrii-maliuta-322a488a/
  • Location
    Ukraine
  • Work
    Web Developer
  • Joined

More fromAndrii Maliuta

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp