apiVersion: apps/v1 kind: Deployment metadata: name: redis spec: selector: matchLabels: app: redis strategy: rollingUpdate: maxSurge: 0 template: metadata: labels: app: redis spec: containers: - name: redis image: redis-placeholder ports: - name: redis containerPort: 6379 securityContext: runAsUser: 999 runAsGroup: 999 fsGroup: 999 --- apiVersion: v1 kind: Service metadata: name: redis spec: ports: - port: 6379 name: redis selector: app: redis