Welcome to indiK8or, the ultimate Kubernetes Cluster Visualization Tool, designed to offer our users real-time cluster metrics monitoring and comprehensive vulnerability scanning functionalities.
- indiK8or provides an intuitive K8s cluster visualization, making it easy for users to access key metrics on their clusters without manually running kubectl commands.
- indiK8or allows users to scan images of each pod in the cluster and provides a comprehensive display of any vulnerabilities detected.
- The built-in Prometheus integration allows users to easily monitor cluster performance with no need for additional configuration.
- Seamless Grafana integration allows access to insightful visualizations of critical cluster metrics without any setup hassles.
Install and start Docker. For demonstration purpose, use minikube to quickly start a local Kubernetes cluster. Start minikube by running minikube start
.
NOTE: FOLLOW STEP 1-12 ONLY IF THIS IS YOUR VERY FIRST TIME USING INDIK8TOR!
-
Fork this repo. Run
npm i
to install all package dependencies. -
Create a MongoDB database to obtain your MONGO_URI.
-
To enable GitHub OAuth, go to your GitHub profile -> Settings -> Developer settings and register indiK8or as a new OAuth application. The Homepage url should be http://localhost:5000, and the authorization callback URL should be http://localhost:4000/auth/github/callback.
-
Create a .env file and assign the following environment variables according to your MongoDB and OAuth set up.
MONGO_URI='' SESSION_SECRET='(Randomly generated string)' GitHubClientID='' GitHubClientSecret=''
-
Install kubectl:
- If you use macOS, run:
brew install kubectl
- If you use Windows, run:
choco install kubernetes-cli
- If you use Linux, run:
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
- If you use macOS, run:
-
Install helm:
- If you use macOS, run:
brew install helm
- If you use Windows, run:
choco install kubernetes-helm
- If you use Linux, run:
NOTE: refer to this link for more details: https://kubernetes.io/docs/tasks/tools/
$ chmod 700 get_helm.sh $ ./get_helm.sh
- If you use macOS, run:
-
Run below code snippet in your terminal:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo add stable https://kubernetes-charts.storage.googleapis.com/ helm repo update
-
Install Prometheus by running below command:
helm install prometheus prometheus-community/kube-prometheus-stack
-
Configure a yaml file for grafana by running below command, and replace 'yourFile' with the name you want for your yaml file.
kubectl get configmap prometheus-grafana -o yaml > yourFile.yaml
-
Once you generated this yaml file, open it and paste the code below into your yaml file inside of grafana.ini
[security]
allow_embedding: true
[auth.anonymous]
enabled: true
[dataproxy]
timeout: 600
-
Apply the yaml file by running below command, and replace 'filePath' with the path of your yaml file.
kubectl apply -f 'filePath'
Here is an example if your yaml file resides in your desktop folder:
kubectl apply -f /Users/Ivy/Desktop/newMap.yaml
-
Install grype.
NOTE: START HERE IF YOU HAVE COMPLETED THE INITIAL SETUP
-
Restart minikube by running below commands:
minikube stop
minikube start
-
Begin port forwarding Grafana with the following command:
kubectl port-forward deployment/prometheus-grafana 3000
Go to http://localhost:3000 and sign in to grafana with below credentials:
default user: admin
default password: prom-operatorNOTE: skip step 2 if you have previously logged in.
-
Run
npm run dev
and visit http://localhost:5000. Voila! You are now able to sign in and view your K8s cluster real-time data!
This page of the application will provide a visual overview of your kubernetes cluster's metrics. The dashboard shows metrics on CPU usage, memory, disk, network, etc.
This page will display the health and status of each pod, providing pod details such as name, status, age, IP, and associated images. Click on the 'SCAN' button to check each image for potential vulnerabilities. Once the scanning process is complete, a pop-up window will list any existing vulnerabilities, if found.
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.
Check out our Medium article here!
Tadd Lerocque | Ivy Wang | Yueran Li | Julian Babon |
Distributed under the MIT License.
❤️ IF OUR PRODUCT HELPED YOU, SHOW LOVE AND SUPPORT BY ⭐️ THIS REPOSITORY! ❤️