"service"类型的kubernetes对象是Pod容器吗?
Is "service" type kubernetes object a Pod container?
来自消费者的服务抽象 Pod IP 地址,pods 之间的负载平衡,依赖标签将服务与 Pod 相关联,持有 Node 的 kube-proxy 提供的虚拟 IP,非临时性
提供以下服务:
$ kubectl -n mynamespace get services | more
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
my-app1 NodePort 192.168.112.249 <none> 80:32082/TCP,2121:30581/TCP 50d
my-app2 NodePort 192.168.113.154 <none> 80:30704/TCP,2121:30822/TCP 50d
my-app3 NodePort 192.168.114.232 <none> 80:32541/TCP,2121:32733/TCP 5d2h
my-app4 NodePort 192.168.115.182 <none> 80:30231/TCP,2121:30992/TCP 5d2h
“服务”类型的 kubernetes 对象是否在数据平面中作为单独的 Pod 容器启动?
Is "service" type kubernetes object launched as a separate Pod container in data plane?
不,Service
是 Kubernetes 中的抽象资源。
来自 Service 文档:
An abstract way to expose an application running on a set of Pods as a network service.
With Kubernetes you don't need to modify your application to use an unfamiliar service discovery mechanism. Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them.
来自消费者的服务抽象 Pod IP 地址,pods 之间的负载平衡,依赖标签将服务与 Pod 相关联,持有 Node 的 kube-proxy 提供的虚拟 IP,非临时性
提供以下服务:
$ kubectl -n mynamespace get services | more
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
my-app1 NodePort 192.168.112.249 <none> 80:32082/TCP,2121:30581/TCP 50d
my-app2 NodePort 192.168.113.154 <none> 80:30704/TCP,2121:30822/TCP 50d
my-app3 NodePort 192.168.114.232 <none> 80:32541/TCP,2121:32733/TCP 5d2h
my-app4 NodePort 192.168.115.182 <none> 80:30231/TCP,2121:30992/TCP 5d2h
“服务”类型的 kubernetes 对象是否在数据平面中作为单独的 Pod 容器启动?
Is "service" type kubernetes object launched as a separate Pod container in data plane?
不,Service
是 Kubernetes 中的抽象资源。
来自 Service 文档:
An abstract way to expose an application running on a set of Pods as a network service. With Kubernetes you don't need to modify your application to use an unfamiliar service discovery mechanism. Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them.