diff --git a/k8s/memcached.yaml b/k8s/memcached.yaml index 56efc235e..ba7c66363 100644 --- a/k8s/memcached.yaml +++ b/k8s/memcached.yaml @@ -16,6 +16,21 @@ spec: securityContext: runAsNonRoot: true containers: + - image: "quay.io/prometheus/memcached-exporter:v0.14.3" + imagePullPolicy: IfNotPresent + name: memcached-exporter + ports: + - name: metrics + containerPort: 9150 + protocol: TCP + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsUser: 65534 # nobody + runAsGroup: 65534 # nobody - image: "memcached:1.6-alpine" imagePullPolicy: IfNotPresent args: ["-m", "1024"] @@ -41,6 +56,8 @@ apiVersion: v1 kind: Service metadata: name: memcached + annotations: + k8s.grafana.com/scrape: "yes" spec: type: ClusterIP ports: @@ -48,5 +65,9 @@ spec: targetPort: memcached protocol: TCP name: memcached + - port: 9150 + targetPort: metrics + protocol: TCP + name: metrics selector: app: memcached