Commit 3374f9f4 authored by Tomohiro Ono's avatar Tomohiro Ono Committed by Yas Naoi
Browse files

Issue #3285053 by onotm, yas: Set up a load balancer when we launch a Cloud...

Issue #3285053 by onotm, yas: Set up a load balancer when we launch a Cloud Orchestrator from a K8s manifest file
parent 51abac74
Loading
Loading
Loading
Loading
+36 −16
Original line number Diff line number Diff line
USAGE INSTRUCTIONS
==================

**1. Apply [`cloud_orchestrator.yml`](amd64/cloud_orchestrator.yml)**
**to your K8s cluster**
### Deploy Cloud orchestrator to your K8s cluster

Note that [default usernames and passwords](amd64/cloud_orchestrator.yml#L18-24) will be set.
Deploy Cloud orchestrator to your K8s cluster by executing the following
command. Note that
[default usernames and passwords](amd64/cloud_orchestrator.yml#L18-24)
will be set.

```
$ kubectl apply -f https://git.drupalcode.org/project/cloud/-/raw/5.x/deployments/kubernetes/amd64/cloud_orchestrator.yml
@@ -17,32 +19,50 @@ If your K8s cluster consists ARM64-based nodes, use
$ kubectl apply -f https://git.drupalcode.org/project/cloud/-/raw/5.x/deployments/kubernetes/arm64/cloud_orchestrator.yml
```

If you want to set your usernames and passwords, follow these commands instead.
#### Alternative procedure

If you want to set your usernames and passwords, or limit which client IP's can
access your Cloud Orchestrator, follow these commands instead.

Download the Cloud Orchestrator manifest file.

```
$ curl -LO https://git.drupalcode.org/project/cloud/-/raw/5.x/deployments/kubernetes/amd64/cloud_orchestrator.yml
$ vi cloud_orchestrator.yml  # Update line 18- 24
```

Update the following lines.

* Line 18- 24: Set your username, password, etc.
* Line 45: Limit which clients can access your Cloud Orchestrator

```
$ vi cloud_orchestrator.yml
```

Apply the manifest file to your K8s cluster.

```
$ kubectl apply -f cloud_orchestrator.yml
```


**2. (Optional) Add a load balancer to access Cloud Orchestrator from your**
**browser**
### Access your Cloud Orchestrator

If you are using EKS, you can add a load balancer to access Cloud Orchestrator
from your browser as follows. Initially, this load balancer accepts all inbound
traffic. To restrict access to Cloud Orchestrator, change the security group
associated with that load balancer.
Check `EXTERNAL-IP` of the Cloud Orchestrator service by using the following
command. For example, if you are using AWS EKS, that is the hostname of a
classic load balancer.

```
$ kubectl expose service cloud-orchestrator  \
    --namespace=cloud-orchestrator  \
    --type=LoadBalancer  \
    --name=cloud-orchestrator-lb
$ kubectl get services  \
    --namespace cloud-orchestrator  \
    --field-selector metadata.name=cloud-orchestrator
```

You can access your Cloud Orchestrator by opening `EXTERNAL-IP` with the prefix
`http://` in your web browser.


**3. Remove Cloud Orchestrator from your K8s cluster**
### Remove Cloud Orchestrator from your K8s cluster

```
$ kubectl delete -f https://git.drupalcode.org/project/cloud/-/raw/5.x/deployments/kubernetes/amd64/cloud_orchestrator.yml
+4 −0
Original line number Diff line number Diff line
@@ -39,6 +39,10 @@ spec:
      protocol: TCP
  selector:
    k8s-app: cloud-orchestrator
  type: LoadBalancer
  # Change the following
  loadBalancerSourceRanges:
    - "0.0.0.0/0"

---

+4 −0
Original line number Diff line number Diff line
@@ -39,6 +39,10 @@ spec:
      protocol: TCP
  selector:
    k8s-app: cloud-orchestrator
  type: LoadBalancer
  # Change the following
  loadBalancerSourceRanges:
    - "0.0.0.0/0"

---