Reputation: 1163
I am testing an kubernetes minikube/influxdb/grafana stack under macos 10.15.3. I am working on the command line.
System environment:
Minikube 1.7.2, downloaded via
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64
I start the minikube from a shell script via
minikube start --extra-config=apiserver.service-node-port-range=3000-61616
The minikube responds with
Creating hyperkit VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
š³ Preparing Kubernetes v1.17.2 on Docker 19.03.5 ...
āŖ apiserver.service-node-port-range=3000-61616
š Launching Kubernetes ...
š Enabling addons: default-storageclass, storage-provisioner
ā Waiting for cluster to come online ...
š Done! kubectl is now configured to use "minikube"
So I assume the the service ports 3000-61616 ARE available in the minikube.
Some shell script lines down the road I create the Grafana service by applying the yaml code:
apiVersion: v1
kind: Service
metadata:
name: grafana
namespace: default
spec:
selector:
app: grafana
type: NodePort
ports:
- protocol: TCP
port: 3000
targetPort: 3000
nodePort: 3000
Which yields:
The Service "grafana" is invalid: spec.ports[0].nodePort: Invalid value: 3000: provided port is not in the valid range. The range of valid ports is 30000-32767
As it seems, the service port range gets reset somehow. The Grafana deployment and other deployments, and influxDB and telegraf services (not of type "NodePort"!) do not cause problems. The same code does not cause these kind of problems on a standard linux-system.
Now some questions:
Upvotes: 2
Views: 1168
Reputation: 164
I was hitting this as well on mac. The key was running minikube delete
and then running minikube start --extra-config=apiserver.service-node-port-range=3000-61616
again.
This was with the Docker driver, not hyperkit FWIW.
Upvotes: 4