-
Notifications
You must be signed in to change notification settings - Fork 909
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
Unable to change service from type=NodePort to type=ClusterIP with kubectl #221
Comments
This is caused by a known issue: mergeKey in |
I've just run into this issue, is there a workaround? |
|
Hitting similar issue. Any workaround which doesn't delete service ? |
@Vikash082 Does |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Just came across this issue so definitely not stale. |
Note: it requires specifying the |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Not fixed:
|
Dup of kubernetes/kubernetes#66390, which has been fixed in kubernetes/kubernetes#66602. Please try using /close Please reopen if needed. |
@dixudx: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
it workd for me |
Should we update the error message? |
is there a workaround for this that does not require the use of |
@mpgarate Have you tried Ref #221 (comment). |
I ran into this message with I suspect this is because I do not have the ip address hard-coded as mentioned in comment 221. In my case is is not practical to do that for every service, and instead I am using a |
@mpgarate Agreed that hardcoding the IP for every service on creation is not practical. But it may be doable to simply copy over the randomly allocated |
use edit service, and |
I use helm and this helped me fix the issue:
Edit: this only works after the first install. So there's no "declarative" workaround, you need to change your service manually. |
In some use cases, users of kafdrop may opt for clusterIP or other K8s Service Types. This help avoid errors from helm when installing the service. Such error may be expressed as: ``` Forbidden: ... may not be used when `type` is 'ClusterIP' ``` Ref: 1. kubernetes/kubectl#221 2. Similar issue: helm/charts#16940 Signed-off-by: Luong Vo <vo.tran.thanh.luong@gmail.com>
|
In some use cases, users of kafdrop may opt for clusterIP or other K8s Service Types. This help avoid errors from helm when installing the service. Such error may be expressed as: ``` Forbidden: ... may not be used when `type` is 'ClusterIP' ``` Ref: 1. kubernetes/kubectl#221 2. Similar issue: helm/charts#16940 Signed-off-by: Luong Vo <vo.tran.thanh.luong@gmail.com>
In some use cases, users of kafdrop may opt for clusterIP or other K8s Service Types. This help avoid errors from helm when installing the service. Such error may be expressed as: ``` Forbidden: ... may not be used when `type` is 'ClusterIP' ``` Ref: 1. kubernetes/kubectl#221 2. Similar issue: helm/charts#16940 Signed-off-by: Luong Vo <vo.tran.thanh.luong@gmail.com>
In some use cases, users of kafdrop may opt for clusterIP or other K8s Service Types. This help avoid errors from helm when installing the service. Such error may be expressed as: ``` Forbidden: ... may not be used when `type` is 'ClusterIP' ``` Ref: 1. kubernetes/kubectl#221 2. Similar issue: helm/charts#16940 Signed-off-by: Luong Vo <vo.tran.thanh.luong@gmail.com>
The following worked for me |
Check for indentations too. In my case its the issue :p |
We wanna release our unused static IP addresses, since all traffic into most hubs now comes in via the ingress controller. The exceptions are the data8x hubs, cs194 prod and the datahubs. We explicitly mark those as LoadBalancer to keep their public IPs intact. I've already removed their DNS entries. You can't actually just change the type from LoadBalancer to ClusterIP (kubernetes/kubectl#221), so this command was used to patch them manually k get ns | rg staging | rg -v datahub | awk '{ print $1; }' | xargs -L1 -I{} kubectl -n {} patch svc proxy-public --type='json' -p '[{"op":"replace","path":"/spec/type","value":"ClusterIP"},{"op":"replace","path":"/spec/ports/0/nodePort","value":null},{"op":"replace","path":"/spec/ports/1/nodePort","value":null},{"op":"replace","path":"/spec/ports/2/nodePort","value":null}]' Ref #2167
We wanna release our unused static IP addresses, since all traffic into most hubs now comes in via the ingress controller. The exceptions are the data8x hubs, cs194 prod and the datahubs. We explicitly mark those as LoadBalancer to keep their public IPs intact. I've already removed their DNS entries. You can't actually just change the type from LoadBalancer to ClusterIP (kubernetes/kubectl#221), so this command was used to patch them manually k get ns | rg staging | rg -v datahub | awk '{ print $1; }' | xargs -L1 -I{} kubectl -n {} patch svc proxy-public --type='json' -p '[{"op":"replace","path":"/spec/type","value":"ClusterIP"},{"op":"replace","path":"/spec/ports/0/nodePort","value":null},{"op":"replace","path":"/spec/ports/1/nodePort","value":null},{"op":"replace","path":"/spec/ports/2/nodePort","value":null}]' Ref #2167
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
/kind bug
Kubernetes version (use
kubectl version
):What happened:
kubectl apply -f
with a similar kube-dns yaml (type=ClusterIP with all nodePorts removed) and hit the same error:What you expected to happen:
Users should be able to modify service type from NodePort to CluserIP.
Anything else we need to know:
Is this a regression? There was a similar bug before (kubernetes/kubernetes#42282), which was fixed.
@mengqiy @kubernetes/sig-cli-bugs
The text was updated successfully, but these errors were encountered: