Skip to content

Commit 3d644c7

Browse files
committed
v1
1 parent 7042ef9 commit 3d644c7

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

containers-orchestration/managed-kubernetes/use-public-cloud-load-balancer/basic_lb_keepip/lb_keepip_reuse_or_already_existing_in_tenant.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ metadata:
44
name: octavia-keepip-with-existing-ip
55
annotations:
66
loadbalancer.ovhcloud.com/class: "octavia"
7-
#loadbalancer.openstack.org/keep-floatingip: "true" # Once the servivce has been created with this flag, K8S cluster will not manage his deletion so IP will not be deleted if your delete the service/LB
87
labels:
98
app: test-octavia
109
spec:
11-
loadBalancerIP: 57.128.57.179 # Deprecated since K8S 1.24 but still used
10+
loadBalancerIP: xx.xx.xx.xx # Public Floating IP you want to use. This annontation is deprecated since K8S 1.24 but still used
1211
ports:
1312
- name: client
1413
port: 80

containers-orchestration/managed-kubernetes/use-public-cloud-load-balancer/private_lb/lb_private_with_openstack_port.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ metadata:
66
annotations:
77
loadbalancer.ovhcloud.com/class: "octavia"
88
service.beta.kubernetes.io/openstack-internal-load-balancer: "true"
9-
# Create a OpenStack port and use this as LB Ip address
10-
# openstack port create --network bdd4fc7c-6a27-43d6-940a-8ed51e1fd22c --fixed-ip subnet=187dc936-c4ea-49ca-aff5-0a5eb7062ed9 my-lb-app-port
11-
# openstack port create --network bdd4fc7c-6a27-43d6-940a-8ed51e1fd22c --fixed-ip subnet=187dc936-c4ea-49ca-aff5-0a5eb7062ed9,ip-address=10.0.2.2 my-lb-app-port-2
129
loadbalancer.openstack.org/port-id: "4c758644-af77-4e60-9e24-bc5e67295ac0"
1310
labels:
1411
app: test-octavia
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Private Load Balancer Demo
2+
3+
## Description
4+
Here is a basic example of how to expose your application using a Service type LoadBalancer in a private way.
5+
6+
## Create a private Load Balancer:
7+
You have to provide the following annotation:
8+
`service.beta.kubernetes.io/openstack-internal-load-balancer: "true"`
9+
10+
## Specify the private IP
11+
You need to provide a PortI
12+
13+
1. Create a OpenStack port and use this as LB Ip address
14+
15+
Without specifying the IP\
16+
`$ openstack port create --network bdd4fc7c-6a27-43d6-940a-8ed51e1fd22c --fixed-ip subnet=187dc936-c4ea-49ca-aff5-0a5eb7062ed9 my-lb-app-port`\
17+
Where: --network = network name or ID, subnet= subnet name or ID
18+
19+
Or with a specific IP of your subnet \
20+
`$ openstack port create --network bdd4fc7c-6a27-43d6-940a-8ed51e1fd22c --fixed-ip subnet=187dc936-c4ea-49ca-aff5-0a5eb7062ed9, ip-address=10.0.2.2 my-lb-app-port-2`
21+
22+
Retrieve the portID :
23+
`$openstack port list --name my-lb-app-port-2`
24+
25+
2. Add the portID to your Kubernetes Service manifest (cf. [exemple](./lb_private_with_openstack_port.yaml))\
26+
`loadbalancer.openstack.org/port-id: "4c758644-af77-4e60-9e24-bc5e67295ac0"`

0 commit comments

Comments
 (0)