7部署rancher步骤_Rancher 部署服务测试
在我的rancher平台里边搭建好集群之后,集群中添加节点节点完成之后https://www.toutiao.com/i6883818647601545740/我需要在我的这个K8S群里边去添加pods或者运行Docker目前我的这个环境,看来应该是通过 Rancher 2.x 基于 RKE 搭建 Kubernetes 集群安装的。Rancher 部署服务如何通过 Rancher UI 来一键式部
在我的rancher平台里边搭建好集群之后,集群中添加节点节点完成之后
https://www.toutiao.com/i6883818647601545740/
我需要在我的这个K8S群里边去添加pods或者运行Docker
目前我的这个环境,看来应该是通过 Rancher 2.x 基于 RKE 搭建 Kubernetes 集群
安装的。
Rancher 部署服务
如何通过 Rancher UI 来一键式部署服务。Rancher Server 中存在一个项目的概念,
默认存在两个项目:default 和 system,类似于 namespaces 但是并不是 namespaces,
而且 namespaces 还率属于某项目下,项目可以配置 Pod 安全策略以及资源配额,可以理解为更好的划分各个项目资源隔离。
default 项目可以理解为非系统项目的个人自定义项目,
system 项目可以理解为具有所有 Kubernetes 和 Rancher 系统命名空间的系统项目,
这是包含所有 Kubernetes 和 Rancher 系统命名空间的系统项目,
修改当前项目中的资源配置可能会导致系统
下面详细罗列添加步骤:
点击全局--前面新建的sandbox

接下来我们切换到集群 sandbox下 default 命令空间下的工作负荷页面来部署一个服务

我们以 nginx 为例,在新的 my-nginx命名空间内,启动一个新的 nginx Pod,并配置容器 80 端口映射到 NodePort 30001 端口来配置 Service,其他配置默认即可。

点击完成,稍等片刻,Rancher Server 就自动在 sandbox Kubernetes 系统内创建了 my-nginx Pod 资源。

如图



从任意节点中请求测试:
对外地址:http://10.211.55.5:30001
node3 root@node3:~# curl -I 10.42.1.7HTTP/1.1 200 OKServer: nginx/1.19.3Date: Fri, 16 Oct 2020 06:44:16 GMTContent-Type: text/htmlContent-Length: 612Last-Modified: Tue, 29 Sep 2020 14:12:31 GMTConnection: keep-aliveETag: "5f7340cf-264"Accept-Ranges: bytesnode3 root@node3:~# curl -I 10.42.0.7HTTP/1.1 200 OKServer: nginx/1.19.3Date: Fri, 16 Oct 2020 06:46:48 GMTContent-Type: text/htmlContent-Length: 612Last-Modified: Tue, 29 Sep 2020 14:12:31 GMTConnection: keep-aliveETag: "5f7340cf-264"Accept-Ranges: bytes

对于新搭建好的pods默认的普罗米修斯监控也是OK的
更多推荐
所有评论(0)