...

Text file src/cuelang.org/go/doc/tutorial/kubernetes/original/services/mon/prometheus/kube.yaml

Documentation: cuelang.org/go/doc/tutorial/kubernetes/original/services/mon/prometheus

     1apiVersion: v1
     2kind: Service
     3metadata:
     4  annotations:
     5    prometheus.io/scrape: 'true'
     6  name: prometheus
     7  labels:
     8    app: prometheus
     9spec:
    10  type: NodePort
    11  ports:
    12  - name: main
    13    port: 9090
    14    protocol: TCP
    15    nodePort: 30900
    16  selector:
    17    app: prometheus
    18---
    19apiVersion: apps/v1
    20kind: Deployment
    21metadata:
    22  name: prometheus
    23spec:
    24  strategy:
    25    rollingUpdate:
    26      maxSurge: 0
    27      maxUnavailable: 1
    28    type: RollingUpdate
    29  selector:
    30    matchLabels:
    31      app: prometheus
    32  replicas: 1
    33  template:
    34    metadata:
    35      name: prometheus
    36      labels:
    37        app: prometheus
    38      annotations:
    39        prometheus.io.scrape: "true"
    40    spec:
    41      containers:
    42      - image: prom/prometheus:v2.4.3
    43        args:
    44          - '--config.file=/etc/prometheus/prometheus.yml'
    45          - '--web.external-url=https://prometheus.example.com'
    46        ports:
    47        - name: web
    48          containerPort: 9090
    49        name: prometheus
    50        volumeMounts:
    51        - name: config-volume
    52          mountPath: /etc/prometheus
    53      volumes:
    54      - name: config-volume
    55        configMap:
    56          name: prometheus

View as plain text