Cass-Operator + IKS Metrics

Metrics with Cass-Operator and IKS

Follow me on GitHub

WARNING Blog building in-progress, come back again soon as updates are happening here.

How To: Cassandra Metrics on IKS

Cassandra Cluster Metrics for kubernetes clusters uses the Metrics Collector to expose metrics to Graphana and Promethesus. In this post I am going to expose ways to install grafana and promethesus via kubernetes. I am also going to go into detail showing how to install grafana and prometheus using operators and the Cass-Operator Metrics Documentation found here.

How To: Install Prometheus?

Prometheus is a free software application used for event monitoring and alerting. It records real-time metrics in a time series database built using a HTTP pull model, with flexible queries and real-time alerting. You can find more information at

Prometheus Method 1

The first method I used to install Prometheus on IBM IKS is an post I found by Bibin Wilson. You can read How to Setup Prometheus Monitoring On Kubernetes Cluster here:

Sources of files used in commands:

The prometheus-deployment.yaml:

apiVersion: apps/v1
kind: Deployment
  name: prometheus-deployment
  namespace: monitoring
    app: prometheus-server
  replicas: 1
      app: prometheus-server
        app: prometheus-server
        - name: prometheus
          image: prom/prometheus
            - "--config.file=/etc/prometheus/prometheus.yml"
            - "--storage.tsdb.path=/prometheus/"
            - containerPort: 9090
            - name: prometheus-config-volume
              mountPath: /etc/prometheus/
            - name: prometheus-storage-volume
              mountPath: /prometheus/
        - name: prometheus-config-volume
            defaultMode: 420
            name: prometheus-server-conf
        - name: prometheus-storage-volume
          emptyDir: {}

The prometheus-service.yaml:

apiVersion: v1
kind: Service
  name: prometheus-service
  namespace: monitoring
  annotations: 'true'   '9090'
    app: prometheus-server
  type: NodePort  
    - port: 8080
      targetPort: 9090 
      nodePort: 30000

The terminal commands I ran:

kubectl create -f clusterRole.yaml
nano config-map.yaml
kubectl create -f config-map.yaml
kubectl create namespace monitoring
kubectl create -f config-map.yaml
nano prometheus-deployment.yaml
kubectl create -f prometheus-deployment.yaml
kubectl get deployments --namespace=monitoring
kubectl get pods --namespace=monitoring
nano prometheus-service.yaml
kubectl create -f prometheus-service.yaml --namespace=monitoring

Port fwd localhost:

kubectl port-forward prometheus-deployment-54686956bd-nhz2s 8080:9090 -n monitoring

Then this Prometheus UI works:


Also the UI is exposed on public worker IP:

Prometheus Method 2

The second method I used to install Prometheus on IBM IKS is an official documentation post I found on You can read more about Prometheus and Grafana installation here:

I completed the helm steps here:

WARNING this Ingres installs as default namespace
WARNING needs to be ingress-nginx

The terminal commands I ran:

kubectl create namespace ingress-nginx
kubectl get svc -n ingress-nginx
kubectl apply --kustomize
helm install my-release ingress-nginx/ingress-nginx -n ingress-nginx
POD_NAME=$(kubectl get pods -l -o jsonpath='{.items[0]}')\
kubectl exec -it $POD_NAME -- /nginx-ingress-controller --version
kubectl get pods --all-namespaces
kubectl get svc -n default
kubectl get svc -n ingress-nginx
kubectl get nodes -o wide
kubectl apply --kustomize
kubectl get svc -n ingress-nginx

After install Promethus UI works:

Graphana works too:
admin / admin

What’s Next?

Stay tuned to the Cass-Operator + IKS page as I complete exposing how to use the Datastax Cassandra Operator for Kubernetes on IBM Cloud IKS Platform.

How can I help you with Kubernetes?


Find me over on the DataStax Community to ask me any questions about Cassandra and Kubernetes. Also let’s chat if you have something kewl you did with Cassandra and Kubernetes and you want me to feature it in my blog. Look below or to the right for more ways to find me.