This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"regexp" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
node "Kubernetes Cluster" as cl { | |
rectangle Deployment { | |
package "prometheus" <<Pod>> { | |
() "port:9090" as p9090 | |
[prometheus] as prom | |
p9090 - prom | |
} | |
} | |
rectangle "Service" { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: stats | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: prometheus | |
namespace: stats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: prometheus | |
namespace: stats | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: prometheus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
node "Kubernetes Cluster" as cl { | |
rectangle "Headless Service" { | |
() "port:6379" as ps6379 | |
() "port:26379" as ps26379 | |
[redis(clusterIP: None)] as hs | |
ps6379 -- hs | |
hs -up- ps26379 | |
} | |
rectangle StatefulSet { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
[redis(slave1)] as slave1 | |
[sentinel] as sentinel2 | |
[redis(slave0)] as slave0 | |
[sentinel] as sentinel1 | |
[redis(master)] as master | |
[sentinel] | |
sentinel -down-> master | |
sentinel1 -down-> slave0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: redis | |
spec: | |
type: ClusterIP | |
clusterIP: None | |
ports: | |
- port: 6379 | |
name: port-redis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
name: redis | |
spec: | |
serviceName: redis | |
selector: | |
matchLabels: | |
redis-app: redis | |
replicas: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global: | |
scrape_interval: 10s | |
evaluation_interval: 10s | |
scrape_configs: | |
- job_name: redis_exporter | |
kubernetes_sd_configs: | |
- role: endpoints | |
relabel_configs: | |
- source_labels: | |
- __meta_kubernetes_namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: redis | |
spec: | |
type: ClusterIP | |
clusterIP: None | |
ports: | |
- port: 6379 | |
name: port-redis |
OlderNewer