摘要: 阅读全文
posted @ 2021-11-11 21:09 401335990 阅读(39) 评论(0) 推荐(0)
摘要: kubectl expose deployment xxx --port=8080 --target-port=8080 --type=LoadBalancer 阅读全文
posted @ 2021-11-11 20:59 401335990 阅读(87) 评论(0) 推荐(0)
摘要: kubectl expose deployment xxxx --port=8080 --target-port=8080 --type=NodePort 清单 中,port是集群中各个服务之间访问的端口 targetPort 是容器暴露的端口 nodePort 是外部访问的随机端口 阅读全文
posted @ 2021-11-11 20:57 401335990 阅读(148) 评论(0) 推荐(0)
摘要: 即将clusterIP属性设置为None即可 访问的方式: 服务名字+名称空间+svc.cluster.local 阅读全文
posted @ 2021-11-11 20:47 401335990 阅读(445) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-11-11 20:27 401335990 阅读(73) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-11-11 19:03 401335990 阅读(57) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-11-11 18:27 401335990 阅读(134) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-11-11 16:18 401335990 阅读(57) 评论(0) 推荐(0)
摘要: limits: 用于限制运行时容器的最大占用资源,当容器占用资源超过limits时会被终止,并进行重启 requests: 用于设置容器需要的最小资源,如果环境资源不够,容器将无法启动 可以通过上面2个选项设置资源的上下限。 阅读全文
posted @ 2021-11-11 16:17 401335990 阅读(240) 评论(0) 推荐(0)
摘要: 1、命令方式 创建服务 kubectl expose deploy nginx --name=svc-nginx --type=ClusterIP --port=80 --target-port=80 集群IP ClusterIP 只能集群内部访问 节点IP NodePort 可以外部访问 kube 阅读全文
posted @ 2021-11-11 15:48 401335990 阅读(31) 评论(0) 推荐(0)