如何在 80 端口设置 k8s 服务:
试:
λ kubectl run hello-nginx --image=nginx --port=80
deployment "hello-nginx" created
λ kubectl expose deployment hello-nginx --type=LoadBalancer
service "hello-nginx" exposed
λ kubectl get services
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hello-nginx 10.0.0.142 <pending> 80:30674/TCP 12m
kubernetes 10.0.0.1 <none> 443/TCP 1h
λ minikube service hello-nginx --url
http://192.168.178.105:30674
是否可以在http://192.168.178.105:80公开此服务?
环境:Windows 10,带有 Hyper-V 的 Docker