...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
vagrant@emco:~/multicloud-k8s/kud/tests$ kcc2 get pods NAME READY STATUS RESTARTS AGE etcd-0 1/1 Running 0 30s etcd-1 1/1 Running 0 18s etcd-2 1/1 Running 0 10s m3db-operator-0 1/1 Running 0 30s |
- m3dbInstallerScript -
- m3db shall be deployed only on a 3 node cluster, and the nodes shall be labelled. For labelling of the nodes, refer the manual steps in the same doc. Labelling of nodes is a pre-requisite.
- This script shall install m3db nodes.
- Helm charts and profile : m3dbHelmCharts
- This script shall also bring m3coordinator-m3db-cluster service.
- A sidecar process, M3Coordinator, allows M3DB to act as the long-term storage for Prometheus. Its responsible for integration with prometheus
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
vagrant@emco:~/multicloud-k8s/kud/tests$ kcc2 get pods NAME READY STATUS RESTARTS AGE etcd-0 1/1 Running 0 5m11s etcd-1 1/1 Running 0 4m59s etcd-2 1/1 Running 0 4m51s gr-grafana-5c57fbd899-llmmm 1/1 Running 0 2d5h m3db-cluster-rep0-0 1/1 Running 0 105s m3db-cluster-rep1-0 1/1 Running 0 84s m3db-cluster-rep2-0 1/1 Running 0 60s m3db-operator-0 1/1 Running 0 5m11s vagrant@emco:~/multicloud-k8s/kud/tests$ kcc2 get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE etcd ClusterIP None <none> 2379/TCP,2380/TCP 5m22s etcd-cluster ClusterIP 10.244.13.90 <none> 2379/TCP 5m22s gr-grafana NodePort 10.244.12.2 <none> 80:30007/TCP 2d5h kubernetes ClusterIP 10.244.0.1 <none> 443/TCP 2d18h m3coordinator-m3db-cluster ClusterIP 10.244.36.133 <none> 7201/TCP,7203/TCP 116s m3dbnode-m3db-cluster ClusterIP None <none> 9000/TCP,9001/TCP,9002/TCP,9003/TCP,9004/TCP,7201/TCP,7203/TCP 116s |
NOTE : Once all the m3db pods and services are up and running, edit the service type to be NodePort as discussed in the manual steps in the same doc.
- CollectD-PrometheusScript -
- This script shall install collectd and prometheus.
- CollectD-PrometheusScript - This script shall install collectd and prometheus. Helm charts for collectd and prometheus : collectd and prometheus
- For connecting prometheus and m3coordinator, in the remote write section of the values.yaml of the prometheus helm charts, add the following:
Code Block | ||||
---|---|---|---|---|
| ||||
remoteWrite:
# - url: http://remote1/push
- url: "http://192.168.121.12:31772/api/v1/prom/remote/write"
writeRelabelConfigs:
- targetLabel: metrics_storage
replacement: m3db_remote |
NOTE , in the above 192.168.121.12 is the ip of the cluster node where m3db is running. 31772 is the NodePort of the m3coordinator.
After running the following pods and services shall be present in the nodes edge1 and edge2
Code Block language bash theme Midnight title Collectd-Prometheus vagrant@emco:~/multicloud-k8s/kud/tests$ kce1 get pods NAME READY STATUS RESTARTS AGE collection-collectd-62z6z 1/1 Running 0 7s collection-grafana-5ff455f786-bcm9m 0/2 Init:0/1 0 5s collection-prometheus-oper-operator-b55765c57-2n7cn 0/1 ContainerCreating 0 5s vagrant@emco:~/multicloud-k8s/kud/tests$ kce2 get pods NAME READY STATUS RESTARTS AGE collection-collectd-jdvl9 1/1 Running 0 13s collection-grafana-5ff455f786-q9rrn 1/2 Running 0 12s collection-prometheus-oper-operator-b55765c57-tzchg 1/1 Running 0 12s vagrant@emco:~/multicloud-k8s/kud/tests$ kce1 get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE collectd ClusterIP 10.244.20.184 <none> 9104/TCP 20s collection-grafana NodePort 10.244.17.32 <none> 80:30092/TCP 19s collection-prometheus-oper-operator ClusterIP 10.244.24.248 <none> 8080/TCP 18s collection-prometheus-oper-prometheus NodePort 10.244.14.32 <none> 9090:30090/TCP 18s kubernetes ClusterIP 10.244.0.1 <none> 443/TCP 2d22h vagrant@emco:~/multicloud-k8s/kud/tests$ kce2 get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE collectd ClusterIP 10.244.13.251 <none> 9104/TCP 30s collection-grafana NodePort 10.244.41.253 <none> 80:30092/TCP 28s collection-prometheus-oper-operator ClusterIP 10.244.10.220 <none> 8080/TCP 28s collection-prometheus-oper-prometheus NodePort 10.244.31.123 <none> 9090:30090/TCP 28s kubernetes ClusterIP 10.244.0.1 <none> 443/TCP 2d22h prometheus-operated ClusterIP None <none> 9090/TCP 7s
- Once all pods are deployed correctly, the topology should be like below:
...