반응형

Network Load Balancer 는 같은 region의 vm 들의 트래픽을 분배해준다.

다시 말해 동일한 Network Load Balancer 를 사용하는 vm 들은 동일한 region에 존재한다.

 

다음과 같은 방법으로 Network Load Balancer 를 생성할 수 있다.

 

1. target pool 생성

target pool 은 forwarding rule 에 정의된 traffic을 받을수 있는 instance group 이다.

gcloud compute target-pools create nginx-pool

 

2. instance group 생성

gcloud compute instance-groups managed create nginx-group \
         --base-instance-name nginx \
         --size 2 \
         --template nginx-template \
         --target-pool nginx-pool

template 에 정의된 nginx-template 은 미리 만들어야 한다. 

 

3. forwarding rule  생성

gcloud compute forwarding-rules create nginx-lb \
         --region us-central1 \
         --ports=80 \
         --target-pool nginx-pool

 

다른글

2019/07/31 - [Development/GoogleCloud] - [GCP]Http Load Balancer

 

참고자료

https://google.qwiklabs.com/focuses/558?parent=catalog&qlcampaign=1c-ccace-12

https://cloud.google.com/load-balancing/docs/network/

 

728x90
반응형

'Development > GoogleCloud' 카테고리의 다른 글

[GCP] Google Cloud Storage Options.  (0) 2019.12.12
[GCP]VPC Network  (0) 2019.08.03
[GCP] Network  (0) 2019.08.01
[GCP]HTTP(S) Load Balancing  (0) 2019.07.31
[GCP] Google Cloud 컨테이너 레지스트리에 이미지 push 하기  (0) 2018.10.19

+ Recent posts