kubernetes: IPAddressWrongReference when creating an existing service

What happened?

POST an existing service. A new ip address will be created and then cleaned up.

2m39s   Warning   IPAddressWrongReference   ipaddress/10.96.77.125    IPAddress: 10.96.77.125 for Service default/kubernetes has a wrong reference; cleaning up

What did you expect to happen?

No new ip address being created.

How can we reproduce it (as minimally and precisely as possible)?

cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Service
metadata:
  name: kubernetes
  namespace: default
spec:
  internalTrafficPolicy: Cluster
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  ports:
  - name: https
    port: 443
    protocol: TCP
    targetPort: 6443
  sessionAffinity: None
  type: ClusterIP
EOF

Anything else we need to know?

No response

Kubernetes version

$ kubectl version
Client Version: v1.33.1
Kustomize Version: v5.6.0
Server Version: v1.33.1

Cloud provider

kind

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Install tools

Container runtime (CRI) and version (if applicable)

Related plugins (CNI, CSI, …) and versions (if applicable)

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 1
  • Comments: 18 (10 by maintainers)

Most upvoted comments

My use case is same as @hoony9x

so the IP allocated is WAI, it worked that way before, it seems the only problem is that is emitting an event, or are there any other issues @liubog2008 ?

@aojea In my case, there are no other issues. (Event emitting is the only problem)

Below are the details in my case:

  • I am implementing operator, which has a Service creation logic.
  • It does not check existance of the target Service when creating it, and just ignores “Already Exists” error.
  • As operator periodically executes the reconcile loop, error Event emitting happens repeatedly.

I am experiencing the same issue.

FYI:

  • To reproduce that issue with kubectl command, you must use kubectl create, not kubectl apply.
  • This bug happens at 1.33 release.
    • 1.33.0, 1.33.1, and 1.33.2 have same issue.
    • It does not happen before 1.33 release.

@liubog2008 why do you want to configure/create default/kubernetes service?

@aroradaman Just an example for easily reproducing.