Skip to content

oslabs-beta/Kubernautical

Repository files navigation

Logo

JavaScript TypeScript NodeJS Express.js React Sass CSS3 HTML5 Webpack Jest Cypress Docker Kubernetes Prometheus Grafana ChartJS Helm GKE AKS EKS


Quick Links

Website Medium LinkedIn



KuberNautical

Introducing KuberNautical, an open-source Kuberenetes developer tool designed to empower you with unparalleled insights and control over your Kubernetes clusters. Seamlessly merging the worlds of metrics analysis and streamlined cluster management, KuberNautical redefines the way you interact with your kubernetes infrastructure.

Getting Started

Features

2D Cluster view

Upon application launch, users can view a robust 2D configuration of their desired cluster.

ClusterViewGif

Metrics Visualization

Users are able to view important metrics and logs pertinent to cluster health.

MetricsGif

Cluster Logs

Users are able to view logs regarding events occuring within cluster. These logs can be filtered by namespace and pod.

LogsGif

Cluster Manipulation

Users have the ability to make live changes to thier cluster in a variety of ways.

NSCreateGif Users can create a new namespace within the current cluster context through the "Edit Cluster" Modal.

MakeDepGif Users can create a new deployment within a given namespace using a public docker image.

ScaleDepGif Users can scale deployments as needed to meet demand.

ExposeDepGif Users can expose deployments within any chosen method, at the given ports.

DeleteNsGif Users can remove a namespace and all resources inside of it.

Load Testing

Users are able to apply a load test to a deployed application of their choosing. LoadTestGif Load Test Result LoadTestAfter

Set Up

  1. Fork this repository and clone it onto your local machine:
git clone https://github.com/oslabs-beta/Kubernautical
  1. Install all package dependencies
npm install

Before you start checklist

Cluster Setup

Google Cluster

  1. Create a standard cluster with Google (autopilot clusters will not work).
  2. Click Connect in GCP and copy the command into your terminal or fill out the command below with pertinent information:
gcloud container clusters get-credentials <yourGKEClusterName> \
 --zone <yourClusterZone> --project <ProjectName>

Microsoft Cluster

  1. Create a cluster with Microsoft.
  2. Click Connect in Azure and copy the command into your terminal or fill out the command below with pertinent information:
az aks get-credentials --resource-group <yourResourceGroupName> \
--name <yourAKSClusterName> --admin

Amazon Cluster

  1. Create a cluster with AWS.
  2. Fill out the command below with pertinent information:
aws eks update-kubeconfig --region <region-code> --name <my-cluster>

Minikube Cluster

  1. Install Docker Desktop. We Reccommend you have 4g+ of free ram as Docker Desktop can overload and crash your machine.
  2. Install Minikube.
  3. Create a cluster
minikube start

Minikube Teardown

  1. Stop your cluster
minikube stop
  1. Delete your cluster (can also use '--all' flag to delete all)
minikube delete

Once your cluster is created

Confirm that your cluster is in your kube config

kubectl config view

Confirm context is set to desired cluster

kubectl config use-context <my-cluster-name>

Prometheus

  1. Create a namespace for prometheus
kubectl create ns prometheus
  1. Install the helm charts
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
  1. Apply the helm charts and install prometheus in the namespace
helm upgrade -i prometheus prometheus-community/prometheus --namespace prometheus
  1. For our application you need to expose the prometheus-server as a load balancer
kubectl expose deployment prometheus-server --port=80 --target-port=9090 --type=LoadBalancer \
 --name prometheus-server-lb --n prometheus

Deployment, target port, type and namespace are all mandatory as above, while port, and name can be customized if desired but name MUST start with prometheus-server

Grafana-loki

  1. Use helm to add Grafana
helm repo add grafana https://grafana.github.io/helm-charts
  1. Update helm if necessary
helm repo update
  1. Check if helm charts installed
helm search repo loki
  1. Create a namespace for Loki
kubectl create ns loki
  1. Install Loki on the loki namespace
helm upgrade --install --namespace loki logging grafana/loki -f yamls/values.yml \
--set loki auth_enabled=false
  1. Deploy Grafana with Loki data source to enable log aggregation
helm upgrade --install --namespace=loki loki-grafana grafana/grafana
  1. Deploy Promtail to enable log scraping from whole cluster
helm upgrade --install promtail grafana/promtail -n loki
  1. Create a daemonset to ensure system-level logging
kubectl apply -f yamls/Daemonset.yaml
  1. Expose loki-gateway as a load balancer
kubectl expose deployment loki-gateway --port=80 --target-port=8080 --type=LoadBalancer \
--name loki-gateway-lb -n loki

Naming conventions for namespaces and services created are customizable, but name for loki-gateway service must start with loki-gateway.

Contributing

Contributions play a vital role in the open-source community. Any contributions are greatly appreciated!

  • Fork the project.
  • Create and work off of your feature branch.
  • Create a pull request with detailed description of your changes from your feature branch to dev branch.
  • Inform us upon PR submission. Once the changes are reviewed and approved, we will merge your code into the main repository.

Meet the Team

Jeremiah Hogue Anthony Vuong Stephen Acosta Michael Van
Jeremiah Hogue
Anthony Vuong
Stephen Acosta
Michael Van

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages