サービスとネットワーキング
あるServiceのselectorにapp=webが指定されており、app=webラベルを持つPodが5つ存在する。そのうち2つのPodはreadinessProbeが継続的に失敗しNotReady状態になっている。このときkubectl describe endpoints <サービス名>の「Addresses:」に表示されるReadyなPodのアドレス数はどれか。
- A5
- ✓3
- C2
- D0
解説
ServiceのEndpointsはReadyなPodのみをAddressesに含め、NotReadyなPodはNotReadyAddressesに分類される。5つのうち2つがNotReadyのため、Readyなアドレス数は5-2=3になる。
根拠Services & Networking: Use ClusterIP, NodePort, LoadBalancer service types and endpoints