Skip to content

Commit 3da10c6

Browse files
authored
Merge pull request #36 from antonin-a/draft-public-cloud-lb-aan
Add Public Cloud Load Balancer examples
2 parents d685846 + 01726ae commit 3da10c6

29 files changed

+590
-0
lines changed

.DS_Store

8 KB
Binary file not shown.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ basics/utils/vars.csv
1515

1616
containers-orchestration/managed-kubernetes/create-cluster-with-tf/my_kube_cluster.yml
1717
containers-orchestration/managed-private-registry/create-registry-with-pulumi/ovhcloud-registry-go/Pulumi.dev.yaml
18+
.DS_Store
19+
1820
*.tfvars
1921
kubeconfig.yml
2022
.quarkus/

containers-orchestration/.DS_Store

6 KB
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: publicCloudLB-basic
5+
labels:
6+
app: test-publicCloudLB
7+
spec:
8+
ports:
9+
- name: client
10+
port: 80
11+
protocol: TCP
12+
targetPort: 80
13+
selector:
14+
app: nginx
15+
type: LoadBalancer
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Basic Public Cloud Load Balancer demo
2+
3+
## Description
4+
Here is a basic example of how to expose your application using a Service type LoadBalancer relying on OVHcloud Public Cloud LoadBalancer.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: publicCloudLB-keepip
5+
annotations:
6+
loadbalancer.openstack.org/keep-floatingip: "true" # Once the IP has been created with this flag, K8S cluster will not manage his deletion / Can be set AFTER the creation
7+
labels:
8+
app: test-publicCloudLB
9+
spec:
10+
ports:
11+
- name: client
12+
port: 80
13+
protocol: TCP
14+
targetPort: 80
15+
selector:
16+
app: nginx
17+
type: LoadBalancer
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: publicCloudLB-keepip-with-existing-ip
5+
labels:
6+
app: test-publicCloudLB
7+
spec:
8+
loadBalancerIP: xx.xx.xx.xx # Public Floating IP you want to use. This annontation is deprecated since K8S 1.24 but still used
9+
ports:
10+
- name: client
11+
port: 80
12+
protocol: TCP
13+
targetPort: 80
14+
selector:
15+
app: nginx
16+
type: LoadBalancer
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Basic Public Cloud Load Balancer and Keep/Re-use IP demo
2+
3+
## Description
4+
[lb_keepip.yaml](./lb_keepip.yaml) is an example of how to keep the Public Floating IP attached to your Public Cloud LoadBalancer even if you delete your Service/LoadBalancer. In case of Service and LoadBalancer deletion, the Floating IP will be unbound and will remains available on your OVHcloud Public Cloud project.
5+
6+
Using [lb_keepip_reuse_or_already_existing_in_tenant.yaml](./lb_keepip_reuse_or_already_existing_in_tenant.yaml) you can use (or re-use) an existing Floating IP available on your OVHcloud Public Cloud project.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: publicCloudLB-udp-tcp
5+
labels:
6+
app: test-publicCloudLB
7+
spec:
8+
ports:
9+
- name: client
10+
port: 80
11+
protocol: TCP
12+
targetPort: 80
13+
- name: client-udp
14+
port: 80
15+
protocol: UDP
16+
targetPort: 80
17+
selector:
18+
app: nginx
19+
type: LoadBalancer
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Basic Public Cloud Load Balancer using UDP demo
2+
3+
## Description
4+
Here is a basic example on how to use your Public Cloud LoadBalancer with UDP protocol.

0 commit comments

Comments
 (0)