? [root@k8s-master01 ~]#kubectl create service nodeport nginx --tcp=80:80 service/nginx created ? [root@k8s-master01 ~]#kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 89m nginx NodePort 10.103.151.47 <none> 80:31901/TCP 18s [root@k8s-master01 ~]#curl 10.103.151.47 <!DOCTYPE html> <html> <head> <title>Welcome to nginx!</title> <style> html { color-scheme: light dark; } body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; } </style> </head> <body> <h1>Welcome to nginx!</h1> <p>If you see this page, the nginx web server is successfully installed and working. Further configuration is required.</p> ? <p>For online documentation and support please refer to <a href="http://nginx.org/">nginx.org</a>.<br/> Commercial support is available at <a href="http://nginx.com/">nginx.com</a>.</p> ? <p><em>Thank you for using nginx.</em></p> </body> </html> ? #外部访问任意node几点ip加端口(注意,随机产生)都可以访问
![基于docker和cri-dockerd部署kubernetes v1.25.3](http://img.zhejianglong.com/231019/131T64W2-1.jpg)
文章插图
推荐阅读
- 小米10S、荣耀60和小米civi怎么选-购机建议
- vivoy31s和iqoou3哪个好_vivoy31s和iqoou3对比
- 皮新字组词|皮的新字和组词
- 小米air2se和红米airdots2区别_小米air2se和红米airdots2哪个好
- 小米10和小米10s拍照对比_小米10和小米10s哪个拍照好
- 兰蔻505和迪奥999对比_兰蔻505和迪奥999哑光试色
- 基于 Docker 构建轻量级 CI 系统:Gitea 与 Woodpecker CI 集成
- 使用LabVIEW实现基于pytorch的DeepLabv3图像语义分割
- vivo s9和vivo x60哪个好_哪个性价比高
- FrameLess Qt--无边框窗口完美实现,包含缩放和移动功能重写。