GithubHelp home page GithubHelp logo

monitor-kubernetes-cluster-'s Introduction

Setting up Prometheus and Grafana in Minikube Cluster

This guide will help you set up Prometheus and Grafana in your Minikube cluster using Helm.

Prerequisites

Make sure you have the following prerequisites installed:

  • Minikube
  • Helm 3

Steps

1. Remove Docker (Optional)

If you already have Docker installed and want to remove it, you can use the following commands:

sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

2. install Docker

  1. Install yum-utils package:

    sudo yum install -y yum-utils
  2. Add Docker repository:

    sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
  3. Install Docker packages:

    sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  4. Start Docker service:

    sudo systemctl start docker

3. Install Minikube

  1. Download Minikube binary:

    curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.x86_64.rpm
  2. Install Minikube:

    sudo rpm -Uvh minikube-latest.x86_64.rpm
  3. Start Minikube cluster:

    minikube start

4. Install Helm

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

5. Install kubectl

1.Download the latest release with the command:

    curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"

2.Install kubectl

    sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

6. Add Prometheus Helm Repository

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts

7. Install Prometheus

helm install prometheus prometheus-community/prometheus

8. Expose Prometheus Service

kubectl expose service prometheus-server --type=NodePort --target-port=9090 --name=prometheus-server-np

9. Add Grafana Helm Repository

helm repo add grafana https://grafana.github.io/helm-charts

10. Install Grafana

helm install grafana grafana/grafana

11. Expose Grafana Service

kubectl expose service grafana --type=NodePort --target-port=3000 --name=grafana-np

Conclusion

Screenshot 2024-05-02 021630 Screenshot 2024-05-02 021909 Screenshot 2024-05-02 023710 Screenshot 2024-05-02 024723

monitor-kubernetes-cluster-'s People

Contributors

amr-elshawarby 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.