ClusterIP (Default)
http://서비스이름:포트
로 접속 가능하다.app-backend
, port를 80
으로 설정했다면 http://app-backend
로 연결할 수 있다.$ kubectl proxy
Starting to serve on 127.0.0.1:8001
$ curl http://localhost:8001/api/v1/proxy/namespaces/default/services/gceme-backend:8080/version
NodePort
$ kubectl get service
포트 정보가 80:32220 되어 있다면, localhost:32220으로 접속할 수 있다.LoadBalancer
localhost:80
으로 접속할 수 있다. 즉, 호스트의 포트를 사용한다.각 서비스별 다이어그램으로 설명되어 있는 글:
https://medium.com/google-cloud/kubernetes-nodeport-vs-loadbalancer-vs-ingress-when-should-i-use-what-922f010849e0
Docker for mac을 사용하는데 상태바에서 주황색 원과 함께 Kubernetes is starting...
라고 뜨면서 호스트에서 접근 할 수 없었다.
Docker for mac을 완전 초기화(Reset -> Reset to factory defaults)하면 running
상태가 되고, 접속할 수 있었다.