Reputation: 6323
In docker run command, we can specify host port range to bind to EXPOSEd container port. Same thing I want to do through Kubernetes. Does any one know, how to do that? My current pod definition is as-
apiVersion: v1
kind: Pod
metadata:
name: nginx-testing
spec:
containers:
- name: nginx-container
image: docker.io/nginx
ports:
- containerPort: 80
hostPort: 9088
At the last line, Instead of specifying single port number, I want a range of port numbers. I tried something like hostPort: 9088-9999 or 9088..9999
, but it wouldn't worked.
Upvotes: 3
Views: 4296