Red Hat OpenShift on IBM Cloud(VPC): Service(type:LoadBalancer) 만들기
결론
type:LoadBalancer
서비스를 만들 때마다 VPC Load Balancer가 하나씩 주문됩니다 (별도 비용 발생). 참고 자료
htps : // c ぉ d. 이 bm. 코 m/도 cs/오페시 ft? 토피 c = 오펜시 ft ぉ 아 d 바 펜 세 r qs # lb_qs_vpc
h tps : // c ぉ d. 이 bm. 코 m/도 cs/오페시 ft? 토피 c = 오펜시 ftvpcl 바아 s
확인
$ oc new-app --name hello-world https://github.com/IBM/container-service-getting-started-wt --context-dir="Lab 1"
$ oc expose service hello-world
와 같이 route를 작성한 상태에서 type:LoadBalancer
의 Service를 만들어 보았다.
$ oc expose dc hello-world --port=80 --target-port=8080 --type=LoadBalancer --name hello-world-lb
$ oc expose dc hello-world --port=8080 --target-port=8080 --type=LoadBalancer --name hello-world-lb
4e5d1726
#しばらく待って再度確認した結果
$ oc get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hello-world ClusterIP 172.21.14.37 <none> 8080/TCP 36h
hello-world-lb LoadBalancer 172.21.82.182 xxxxxxxx-us-south.lb.appdomain.cloud 80:32737/TCP 54m
hello-world-lb2 LoadBalancer 172.21.93.55 yyyyyyyy-us-south.lb.appdomain.cloud 8080:32532/TCP 31s
$ oc describe service hello-world-lb
Name: hello-world-lb
Namespace: syasuda
Labels: app=hello-world
app.kubernetes.io/component=hello-world
app.kubernetes.io/instance=hello-world
Annotations: <none>
Selector: deploymentconfig=hello-world
Type: LoadBalancer
IP: 172.21.82.182
LoadBalancer Ingress: xxxxxxxx-us-south.lb.appdomain.cloud
Port: <unset> 80/TCP
TargetPort: 8080/TCP
NodePort: <unset> 32737/TCP
Endpoints: 172.17.111.9:8080,172.17.115.137:8080,172.17.123.76:8080 + 2 more...
Session Affinity: None
External Traffic Policy: Cluster
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal EnsuringLoadBalancer 17m service-controller Ensuring load balancer
Normal EnsuredLoadBalancer 17m service-controller Ensured load balancer
Normal CloudVPCLoadBalancerNormalEvent 11m ibm-cloud-provider Event on cloud load balancer hello-world-lb for service syasuda/hello-world-lb with UID 12b7ca92-aad5-42d7-b0fa-eac967b1192d: The VPC load balancer that routes requests to this Kubernetes LoadBalancer service is currently online/active.
위의 이벤트 로그에 설명 된대로 ibm-cloud-provider가 VPC Load Balancer를 작성했습니다.
실제로 IBM Cloud Portal에서 확인해 보면 ... 확실히 새롭게 VPC Load Balancer가 작성되고 있다! (다른 Load Balancer는 Route용입니다)
액세스 테스트$ curl xxxxxx-us-south.lb.appdomain.cloud:80
Hello world from hello-world-1-rb8nt! Your app is up and running in a cluster!
$ curl yyyyyy-us-south.lb.appdomain.cloud:8080
Hello world from hello-world-1-rb8nt! Your app is up and running in a cluster!
Reference
이 문제에 관하여(Red Hat OpenShift on IBM Cloud(VPC): Service(type:LoadBalancer) 만들기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/testnin2/items/ed694291742464e9c70a
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
$ oc new-app --name hello-world https://github.com/IBM/container-service-getting-started-wt --context-dir="Lab 1"
$ oc expose service hello-world
$ oc expose dc hello-world --port=80 --target-port=8080 --type=LoadBalancer --name hello-world-lb
$ oc expose dc hello-world --port=8080 --target-port=8080 --type=LoadBalancer --name hello-world-lb
4e5d1726
#しばらく待って再度確認した結果
$ oc get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hello-world ClusterIP 172.21.14.37 <none> 8080/TCP 36h
hello-world-lb LoadBalancer 172.21.82.182 xxxxxxxx-us-south.lb.appdomain.cloud 80:32737/TCP 54m
hello-world-lb2 LoadBalancer 172.21.93.55 yyyyyyyy-us-south.lb.appdomain.cloud 8080:32532/TCP 31s
$ oc describe service hello-world-lb
Name: hello-world-lb
Namespace: syasuda
Labels: app=hello-world
app.kubernetes.io/component=hello-world
app.kubernetes.io/instance=hello-world
Annotations: <none>
Selector: deploymentconfig=hello-world
Type: LoadBalancer
IP: 172.21.82.182
LoadBalancer Ingress: xxxxxxxx-us-south.lb.appdomain.cloud
Port: <unset> 80/TCP
TargetPort: 8080/TCP
NodePort: <unset> 32737/TCP
Endpoints: 172.17.111.9:8080,172.17.115.137:8080,172.17.123.76:8080 + 2 more...
Session Affinity: None
External Traffic Policy: Cluster
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal EnsuringLoadBalancer 17m service-controller Ensuring load balancer
Normal EnsuredLoadBalancer 17m service-controller Ensured load balancer
Normal CloudVPCLoadBalancerNormalEvent 11m ibm-cloud-provider Event on cloud load balancer hello-world-lb for service syasuda/hello-world-lb with UID 12b7ca92-aad5-42d7-b0fa-eac967b1192d: The VPC load balancer that routes requests to this Kubernetes LoadBalancer service is currently online/active.
$ curl xxxxxx-us-south.lb.appdomain.cloud:80
Hello world from hello-world-1-rb8nt! Your app is up and running in a cluster!
$ curl yyyyyy-us-south.lb.appdomain.cloud:8080
Hello world from hello-world-1-rb8nt! Your app is up and running in a cluster!
Reference
이 문제에 관하여(Red Hat OpenShift on IBM Cloud(VPC): Service(type:LoadBalancer) 만들기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/testnin2/items/ed694291742464e9c70a텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)