Installing Istio results with this error: "Invalid value: 31380: provided port is already allocated"
This document (000021610) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Rancher 2.7.x+
Istio 102.3.1+up1.18.2
Situation
When trying to install Istio from "Apps" in the Rancher UI the installation fails with the below error.
Ingress gateways encountered an error: failed to update resource with server-side apply for obj Service/istio-system/istio-ingressgateway:
Service "istio-ingressgateway" is invalid: spec.ports[1].nodePort: Invalid value: 31380: provided port is already allocated
Resolution
You can use a different port by adding a 'Custom Overlay File' to the install.
1. Go to the Istio chart in Apps|Charts.
2. Click on 'Update'.
3. Check 'Customize Helm options before install'.
4. Add the following lines to 'Custom Overlay File' by adding the following lines starting on line 1.
5. Change the nodePort to a different value from 31380 to 31370.
6. Once you have added the below lines, you can click on 'Next' and then 'Update'.
(I just chose 31370; you can choose any open port on your cluster in the range of 30000-32767)
### alter only the status-port as nodeport 31370
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
components:
ingressGateways:
- enabled: true
name: istio-ingressgateway
k8s:
service:
ports:
- name: status-port
port: 15021
targetPort: 15021
nodePort: 31370
protocol: TCP
7. Upon completion of the update, you can verify by executing the following command to confirm.
(The NodePort below shows 31370)
kubectl get svc -n istio-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kiali ClusterIP 10.43.228.239 <none> 20001/TCP 3d23h
istiod ClusterIP 10.43.166.131 <none> 15010/TCP,15012/TCP,443/TCP,15014/TCP 3d23h
istio-ingressgateway NodePort 10.43.36.43 <none> 15021:31370/TCP 3d23h
Cause
The is caused by another application that is currently using the default port of Istio. Which is causing a conflict with the default port.
Additional Information
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.