This commit is contained in:
huanqing.shao
2019-10-28 20:51:59 +08:00
parent 00e8c35471
commit df1c6afe10
20 changed files with 814 additions and 74 deletions

View File

@ -420,6 +420,8 @@ Hit enter for command prompt
## 暴露 Service
<SharingBlock>
在您的应用程序中,可能有一部分功能需要通过 Service 发布到一个外部的 IP 地址上。Kubernetes 支持如下两种方式:
* [NodePort](./service-types.html#nodeport)
* [LoadBalancer](./service-types.html#loadbalancer)
@ -458,3 +460,5 @@ spec:
* 对于 HTTP、HTTPS 形式的访问推荐使用 Ingress 替代这种用法,参考 [Ingress通过互联网访问您的应用](./ingress.html)
* 对于 TCP、UDP 等形式的访问,您仍然应该使用 Service NodePort
:::
</SharingBlock>

View File

@ -108,6 +108,8 @@ fe00::2 ip6-allrouters
## 为什么kubelet要管理hosts文件
<SharingBlock>
Kubelet [管理](https://github.com/kubernetes/kubernetes/issues/14633) `hosts` Pod 中每个容器的 hosts 文件,以便可以阻止 Docker 在容器启动以后 [修改](https://github.com/moby/moby/issues/17190) 该文件。
细节情况请参考两个 github issue
@ -117,3 +119,5 @@ Kubelet [管理](https://github.com/kubernetes/kubernetes/issues/14633) `hosts`
[https://github.com/moby/moby/issues/17190](https://github.com/moby/moby/issues/17190)
由于该文件已经被 Kubelet 管理起来,任何对该文件手工修改的内容,都将在 Kubelet 重启容器或者 Pod 重新调度时被覆盖。因此,最好是通过 `hostAliases` 修改 Pod 的 /etc/hosts 文件,而不是手工修改。
</SharingBlock>