Giriş
Bir servisin hangi pod'a erişimi sağladığını gösterir.
Örnek
Şöyle yaparız
kubectl get endpoints
Örnek
Şöyle yaparız
# Get the kubernetes service > kubectl get svc kubernetes -n default -------------------------------------------------------------------- NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) kubernetes ClusterIP 10.96.0.1 <none> 443/TCP -------------------------------------------------------------------- # List the endpoints of the kubernetes service > kubectl get endpoints -n default kubernetes -------------------------------------------------------------------- NAME ENDPOINTS AGE kubernetes 10.25.96.3:6443 24d -------------------------------------------------------------------- # Get local endpoint of the k8s cluster from the Kubernetes service > ENDPOINT=https://$(kubectl get endpoints kubernetes -n default \ -o jsonpath='{.subsets[0].addresses[0].ip}'):6443/ > echo $ENDPOINT -------------------------------------------------------------------- https://10.25.96.3:6443/ # (This will vary in your case) --------------------------------------------------------------------
Hiç yorum yok:
Yorum Gönder