When I create a service for redis always appears Endpoints:
Name: redis
Namespace: default
Labels: app=redis
tier=backend
Annotations: <none>
Selector: app=redis,tier=backend
Type: NodePort
IP Family Policy: SingleStack
IP Families: IPv4
IP: 10.110.46.29
IPs: 10.110.46.29
Port: <unset> 6379/TCP
TargetPort: 6379/TCP
NodePort: <unset> 30195/TCP
Endpoints: <none>
Session Affinity: None
External Traffic Policy: Cluster
Events: <none>
My yaml for service is the following:
apiVersion: v1
kind: Service
metadata:
name: redis
labels:
app: redis
tier: backend
spec:
type: NodePort
ports:
- port: 6379
targetPort: 6379
selector:
app: redis
tier: backend
My deployment is the next one:
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
labels:
app: redis
tier: backend
spec:
replicas: 1
selector:
matchLabels:
app: redis
tier: backend
template:
metadata:
labels:
app: redis
tier: backend
spec:
containers:
- name: contenedor-redis
image: redis
ports:
- name: redis-server
containerPort: 6379
I do not know if I am missing something
Thanks in advance