kubectl: Service's information about Endpoints doesn't update after creating EndpointSlice object
What happened?
Hello everyone! Trying to follow the documentation page https://kubernetes.io/docs/concepts/services-networking/endpoint-slices/ I made a Service (with no selectors) and a EndpointSlice based on documentation. Unfortunately, command “kubectl describe svc” indicates that EndpointSlice didn’t map to a Service (Endpoints: <none>), but it actually did.
What did you expect to happen?
“kubectl describe svc” shows “Endpoints: “Ip from endpointslice object””
How can we reproduce it (as minimally and precisely as possible)?
- Create objects (Service and EndpointSlice)
- kubectl describe svc external
Service:
apiVersion: v1 kind: Service metadata: name: external namespace: default spec: ipFamilies:
- IPv4 ports:
- port: 80 protocol: TCP targetPort: 80 type: ClusterIP
apiVersion: discovery.k8s.io/v1 kind: EndpointSlice metadata: name: external labels: kubernetes.io/managed-by: manual kubernetes.io/service-name: external addressType: IPv4 ports:
- port: 80 endpoints:
- addresses:
- “my ip” conditions: ready: true
Anything else we need to know?
No response
Kubernetes version
$ kubectl version
# paste output here
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short. Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.4", GitCommit:"fa3d7990104d7c1f16943a67f11b154b71f6a132", GitTreeState:"clean", BuildDate:"2023-07-19T12:20:54Z", GoVersion:"go1.20.6", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v5.0.1
Server Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.4", GitCommit:"fa3d7990104d7c1f16943a67f11b154b71f6a132", GitTreeState:"clean", BuildDate:"2023-07-19T12:14:49Z", GoVersion:"go1.20.6", Compiler:"gc", Platform:"linux/amd64"}
Cloud provider
no
OS version
# On Linux:
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
# paste output here
$ uname -a
Linux Master-node-1 5.15.0-78-generic kubernetes/kubernetes#85-Ubuntu SMP Fri Jul 7 15:25:09 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
# paste output here
# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
Install tools
kubeadm version: &version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.4", GitCommit:"fa3d7990104d7c1f16943a67f11b154b71f6a132", GitTreeState:"clean", BuildDate:"2023-07-19T12:19:40Z", GoVersion:"go1.20.6", Compiler:"gc", Platform:"linux/amd64"}
Container runtime (CRI) and version (if applicable)
containerd containerd.io 1.6.21 3dce8eb055cbb6872793272b4f20ed16117344f8
Related plugins (CNI, CSI, …) and versions (if applicable)
docker.io/weaveworks/weave-kube@sha256:35827a9c549c095f0e9d1cf8b35d8f27ae2c76e31bc6f7f3c0bc95911d5accea
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (9 by maintainers)
This should happen only with custom created objects, IIRC he mirroring controller must take over and create the corresponding EndpointSlices …