Slide 7
Slide 7 text
Kubernetes Sapporo for Beginners
同一クラスタ内
Service: ClusterIP
Node-A
● クラスタ内で使うもの。
例:内部用バックエンドAPI。
● ロードバランシング方法は、バージョンやその実装に依存。
(GKEだと変更できない)
proxy-modeの話はこちら!
● クラスタIPを変えたい場合は、再作成が必要。
Node-B Node-C
pod-0 pod-1
<>
kube-proxy
pod-2
$ kubectl apply -f ./hands-on/Step3-Service-Ingress/service/service-clusterip.yaml
$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
greet-cip ClusterIP 10.102.66.190 80/TCP 19s
$ kubectl exec -it cluster-pod -- curl http://greet-cip.default.svc.cluster.local/hello
$ kubectl exec -it cluster-pod -- curl http://10.102.66.190/hello
$ curl http://10.102.66.190/hello
← OK
← OK
← NG