Giter Site home page Giter Site logo

dashboard-k8s's Introduction

dashboard-k8s

Learn how to configure the access to microk8s' dashboard

We assume that microk8s is already installed on your system and you are using a Linux server.

Check if dashboard is available

Run the following command to see if dashboard is available.

microk8s status

You should get something like this:

microk8s is running
high-availability: no
  datastore master nodes: 127.0.0.1:19001
  datastore standby nodes: none
addons:
  enabled:
    ...
  disabled:
    ...
    dashboard            # (core) The Kubernetes dashboard
    ...

Enable the dashboard

Run the following command to enable the addon dashboard:

microk8s enable dashboard

You should get something like this:

Infer repository core for addon dashboard
Addon core/dashboard is enabled

Check if the dashboard is running

Run the following command:

microk8s kubectl -n kube-system get svc

You should see the service for dashboard.

NAME                   TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)   AGE
kubernetes-dashboard   ClusterIP   10.20.30.40   <none>        443/TCP   1h

Make the dashboard accessible at all times

Run the following commands using the file k8s-dashboard-lb.yaml from this repo.

microk8s kubectl apply -f k8s-dashboard-lb.yml
microk8s kubectl -n kube-system get svc

You should see the new service and at which port is exposed:

NAME               TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)         AGE
k8s-dashboard-lb   LoadBalancer   10.152.183.81   <pending>     443:30123/TCP   1m

Now you can access it at https://127.0.0.1:30123.

Authentication

To be able to login in dashboard you need to create a token with the following command:

microk8s kubectl create token default > k8s-token.txt

The token will be saved in k8s-token.txt file. You need to copy it from there and use it in the browser.

Using nginx as proxy

You can use the nginx.conf file as example how to access the dashboard from internet using nginx as web server.

Replace k8s.<YOUR-DOMAIN> with your hostname and <MAPPED_PORT_443> with the exposed port (in our example was 30123).

Don't forget also to enable the HTTPS for it.

dashboard-k8s's People

Contributors

iulianraduat avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.