apiVersion: v1 kind: Service metadata: name: pomerium-cache-service spec: clusterIP: None # cache is a headless service! ports: - port: 443 name: grpc selector: app: pomerium-cache type: ClusterIP --- apiVersion: apps/v1 kind: Deployment metadata: name: pomerium-cache labels: app: pomerium-cache spec: replicas: 1 selector: matchLabels: app: pomerium-cache template: metadata: labels: app: pomerium-cache spec: containers: - image: pomerium/pomerium:master name: pomerium-cache args: - --config=/etc/pomerium/config.yaml ports: - containerPort: 443 name: grpc protocol: TCP env: - name: SERVICES value: cache - name: SHARED_SECRET valueFrom: secretKeyRef: name: shared-secret key: shared-secret readinessProbe: tcpSocket: port: 443 initialDelaySeconds: 5 periodSeconds: 10 livenessProbe: tcpSocket: port: 443 initialDelaySeconds: 15 periodSeconds: 20 volumeMounts: - mountPath: /etc/pomerium/ name: config volumes: - name: config configMap: name: config