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