Slide 47
Slide 47 text
Describeで、より詳細を見てみる
kubectl describe svc svc-sample
Name: svc-sample
Namespace: default
Labels:
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"name":"svc-sample","namespace":"defaultSelector: app=nginxType:
NodePortIP: 10.110.100.22
Port: http-port 8080/TCP
TargetPort: 80/TCP
NodePort: http-port 31706/TCP
Endpoints: 10.244.1.10:80,10.244.2.10:80,10.244.3.10:80
Session Affinity: None
External Traffic Policy: Cluster
Events:
k8s Clusterの状態
ServiceとPodが対応してることがわかる
kubectl get po -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod/nginx-deployment-5fbf59df75-55j5b 1/1 Running 0 83m 10.244.3.10 worker03
pod/nginx-deployment-5fbf59df75-6hnbq 1/1 Running 0 83m 10.244.2.10 worker02
pod/nginx-deployment-5fbf59df75-fwqpn 1/1 Running 0 83m 10.244.1.10 worker01
NodePortが確認できる