Cluster information:
Kubernetes version: 1.18.2
Cloud being used: bare-metal
Installation method: kubeadm
Host OS: ubuntu 18
hi
I started using ServiceTopology in my cluster. see topic: Service Topology and EndpointSlices complete usage
ServiceTopology works fine if the pods is searched through a selector.
Now I want to create a service and specify the endpoint for it manually (service without a selector)
Before, until EndpointSlice, I just manually specify the endpoint, but now kube-proxy does not read the endpoint and the ipvs creates empty vip
I am trying to specify EndpointSlice manually. but the service is still created empty (I read it here EndpointSlices | Kubernetes
yaml:
apiVersion: v1
kind: Service
metadata:
name: proxy-test
spec:
type: ClusterIP
ports:
- protocol: TCP
port: 80
targetPort: 80
topologyKeys:
- "kubernetes.io/hostname"
- "*"
---
apiVersion: v1
kind: Endpoints
metadata:
name: proxy-test
subsets:
- addresses:
- ip: 1.1.1.1 # test ip
ports:
- port: 8081
---
apiVersion: discovery.k8s.io/v1beta1
kind: EndpointSlice
metadata:
name: proxy-test
labels:
kubernetes.io/service-name: proxy-test
endpointslice.kubernetes.io/managed-by: manual
addressType: IPv4
ports:
- name: http
protocol: TCP
port: 8081
endpoints:
- addresses:
- "1.1.1.1"
conditions:
ready: true
hostname: kuber-04
topology:
kubernetes.io/hostname: kuber-04
I check on server kuber-04
in IPVS I do not see the created EndpointSlice, only an empty service
what am I doing wrong? where can i read more complete documentation? in kube-proxy I did not find errors.
thanks
P.S
EndpointSlice:
kuber-04 ~/dns # kubectl get EndpointSlice -n proxy
NAME ADDRESSTYPE PORTS ENDPOINTS AGE
proxy-test IPv4 8081 1.1.1.1 47h
any help is appreciated