-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
createOrReplace with the same yaml file will be got error like ' provided port is already allocated' #2630
Comments
@rohanKanojia thanks for your response. I have debugged and found the version below 4.11.0 , the same service.yaml would firstly being compared to the one from the server, then it would call API By the way, unaltered file deployment.yaml goes right with duplicate deploying. |
Strange, I think it should fail with both client versions on second createOrReplace. Do you have a small reproducer for us? I marked this related to #2454 since client should ignore doing an update if nothing has changed(just like |
@rohanKanojia Ok. service.yaml
call service demo
|
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions! |
same issue with v5.12.1 |
@shawkins Thank you for your reply. My Kubernetes cluster versions are from v1.13 to v1.22, it seems that the server side apply feature is supported from kubernetes 1.16. To solve this problem, I use replace api rather than createOrReplace when the svc resources exist in cluster, and the svc can be updated correctly. |
See related stack overflow Q&A at https://stackoverflow.com/questions/75887561/fabric8-kubernetesclient-equivalent-of-kubectl-apply-f |
steps:
1.the first time to deploy a service to k8s by service.yaml file, success
2.the next deploy the same service.yaml file (unchanged) , failed
code
logs like these
Unlike 2454 ,
the log shows the POST METHOD, and msg "spec.ports[0].nodePort: Invalid value: 30081: provided port is already allocated."
Everything goes right in 4.10.3, and the problem occured only in 4.11.0+ , I know the createOrReplace had been refactored since 4.11.0, but i can not find any other issues like 'port already allocated'
The text was updated successfully, but these errors were encountered: