Giter Club home page Giter Club logo

k8s-prometheus-cc's Introduction

create a namespace for prometheus

kubectl create namespace prometheus

create service user via confluent cli

confluent login
confluent iam service-account create prommetrics --description "prometheus monitoring"

should result in something like this

+-------------+-----------------------+
| ID          | sa-xxxxxx             |
| Name        | prommetrics           |
| Description | prometheus monitoring |
+-------------+-----------------------+

assign role binding

confluent iam rbac role-binding create --role MetricsViewer --principal User:sa-35d9jo

check the binding

confluent iam rbac role-binding list --principal User:sa-35d9jo

create an api key for the new service account

check the binding

confluent api-key create --resource cloud --service-account sa-35d9jo

should result in something like

+------------+------------------------------------------------------------------+
| API Key    | EIXNNADZZWLJUMQQ                                                 |
| API Secret | bJmXgfRTNHi51nVKwbCTk5u/W41sZYZGAR7T0rkzVVS6sCoQKBFjj2J2adWV99JB |
+------------+------------------------------------------------------------------+

note down API key and api secret for later usage

create the rolebinding with

kubectl create -f clusterRole.yml -n prometheus

adapt config map

use the existing config-map.yaml and adapt the following

set username and password to the API Key and API Secret created above

        basic_auth:
          username: EIXNNADZZWLJUMQQ
          password: bJmXgfRTNHi51nVKwbCTk5u/W41sZYZGAR7T0rkzVVS6sCoQKBFjj2J2adWV99JB

set your kafka cluster id accordingly (see confluent cloud ui or similar)

        params:
          "resource.kafka.id":
            - lkc-pkx1jk

create the config map with

kubectl create -f config-map.yml -n prometheus

create the prometheus deployment

kubectl create  -f prometheus-deployment.yml  -n prometheus

create the grafana deployment

kubectl create  -f grafana.yml  -n prometheus

get the pods

kubectl get pods -n prometheus

create port forward

have look for a pod like prometheus-deployment-xx-xx

kubectl port-forward prometheus-deployment-57898c796b-rkgcs 9090:9090 -n prometheus

prometheus should reachable on your localhost via port 9090

do the same for grafana

add prometheus as data source

login to grafana via localhost:3000 (admin/admin)

go to Connections -โ†’ Data sources

Click Add data source

Choose prometheus

prom01

enter prometheus server url, e.g. http://10.48.1.47:9090

prom02

scroll to the bottom of the page click save & test

-โ†’ a success message should appear

prom03

import example dashboards to grafana

Import the example dashboard from here via grafana ui.

grafana01
grafana02
grafana03
grafana04

k8s-prometheus-cc's People

Contributors

mmuehlbeyer 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.