apiVersion: v1 kind: Service metadata: name: redismaster labels: name: redis-master spec: ports: # The port that this service should serve on. # You don't need to specify the targetPort if it is the same as the port, # though here we include it anyway, to show the syntax. - port: 6379 targetPort: 6379 selector: name: redis-master