github.com/joomcode/cue@v0.4.4-0.20221111115225-539fe3512047/doc/tutorial/kubernetes/original/services/mon/prometheus/kube.yaml (about)

     1  apiVersion: v1
     2  kind: Service
     3  metadata:
     4    annotations:
     5      prometheus.io/scrape: 'true'
     6    name: prometheus
     7    labels:
     8      app: prometheus
     9  spec:
    10    type: NodePort
    11    ports:
    12    - name: main
    13      port: 9090
    14      protocol: TCP
    15      nodePort: 30900
    16    selector:
    17      app: prometheus
    18  ---
    19  apiVersion: apps/v1
    20  kind: Deployment
    21  metadata:
    22    name: prometheus
    23  spec:
    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