Kubernetes Nginx Service发现并访问
启动nginx service:
kubectl run nginx --image=nginx
查看service状态:
kubectl get services
发现只有kubernets service:
kubernetes 10.254.0.1 <none> 443/TCP 1d
使用如下命令暴露nginx:
kubectl expose deployment nginx --port=80 --type=LoadBalancer
再次查看service状态:
kubectl get services
发现nginx service:
参考链接:http://kubernetes.io/docs/user-guide/simple-nginx/