apiVersion: v1 kind: Service metadata: name: redis-service spec: selector: pod: redis ports: - protocol: TCP port: 6379 targetPort: 6379