Skip to content

oslabs-beta/Allok8

Repository files navigation

Allok8

image ⚓️⚡️🔦

Allok8 is a dynamic, conventional, and uncomplicated Kubernetes visualization tool. Current tooling only enables resource portraits at the pod level. When the application adds layers of complexity, it is advantageous to visualize when pods have multiple containers. This enables users to manage resource levels, navigate clusters, and display all relevant information down to the container level.

The standard practice of one container per pod works most of the time because it lends to better portability, but when containers are interdependent, keeping track of the resource utilization is sparse. Allok8 wishes to showcase that hidden data in hopes of empowering users to further synthesize their K8s implementation.

Further data within containers that is provided (but not limited to):

  • CPU
  • Memory
  • Capacity
  • Addresses

Screenshots

image image

Getting Started

🏗⚙️🛠

In order to access the dashboard, the user must input the K8s cluster API and token which is typically provided by the system administrator. If you need more information to obtain this, we've provided additional instructions on our landing page.

To check the location and credentials that kubectl knows about, use the following command:

kubectl config view

Alternatively, you can refer to the offical K8s documents for more information.

To access a cluster, you would need the location of the cluster and have credentials to access it. Once aquired, simply type in the credentials in the input fields provided, hit fetch, and enjoy! ~

How To Use

🗺📙📊

Minikube Installation

Minikube Start

  • start minikube

minikube start --driver=hyperkit

Minikube Start for test with applications that use ingress-nginx

minikube start

minikube addons enable ingress

minikube start --driver=hyperkit minikube addons enable ingress Note for Minikube Users and the Docker Driver

Recent versions of Minikube will use the docker driver by default when you run minikube start. On Windows or macOS, the docker driver is not compatible with an ingress, which we will be using throughout the course.

https://minikube.sigs.k8s.io/docs/drivers/docker/#known-issues

kubernetes/minikube#7332

To avoid this issue, you can pass the --driver flag with a specific driver or --vm=true

macOS

minikube start --vm=true

or

minikube start --driver=hyperkit

or

minikube start --driver=virtualbox

Windows:

minikube start --vm=true

or

minikube start --driver=hyperv

or

minikube start --driver=virtualbox

  • if using virtual box there is a known installation error

kubernetes/minikube#7332

  • here is a workaround virtualbox workaroud

Enable Addons

  • enable metrics-server addon

minikube addons enable metrics-server

Deployment

  • In Allok8 directory, deploy metrics-server-yaml

kubectl apply -f metrics-server-yaml/

  • Deploy Allok8 with postgres database

kubectl apply -f deploy.yaml

  • If using for testing of other application, deploy yaml files for that application

kubectl apply -f yourApplicationsYamls.yaml

  • verify running pods and services

kubectl get pods -A

kubectl get svc -A

Usage

  • In Allok8 directory,

npm install

  • build

npm run build

  • start

npm start

  • navigate to localhost in browser

http://localhost:3000

  • alternatively Allok8 can be run in dev mode and webpack-dev-server will open a browser

npm run dev

  • Click on GET API/ TOKEN

  • Copy and paste approriate string into terminal concatenating 'echo' on beginning of command

echo $(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}')

api-command

echo $(kubectl get secret $(kubectl get serviceaccount default -o jsonpath='{.secrets[0].name}') -o jsonpath='{.data.token}' | base64 --decode )

  • Enter API and TOKEN into Allok8

  • Allow for time as server will aggregate data

  • Refresh page enter API and TOKEN into Allok8 again

  • Enjoy your data!

Contributing

🕊💫👋

We love feedback! We are always looking to improve. For major changes, please open an issue first to discuss what you would like to change, pull requests are welcome.

Built With

🧰🚢🐳

Authors

✏️👩‍💻👨‍💻📓

Previous Authors:

License

🔖⛴