apiVersion: v1
kind: Service
metadata:
  name: redis
  namespace: db
spec:
  ports:
    - port: 6379
      protocol: TCP
      targetPort: 6379
---
apiVersion: v1
kind: Endpoints
metadata:
  name: redis
  namespace: db
subsets:
  - addresses:
      - ip: 192.168.1.2
    ports:
      - port: 6379
        protocol: TCP
