Skip to content

Commit 03cfdbd

Browse files
committed
complete README for each exampel
1 parent 944fc1c commit 03cfdbd

File tree

11 files changed

+123
-12
lines changed

11 files changed

+123
-12
lines changed

containers-orchestration/managed-kubernetes/use-public-cloud-load-balancer/basic_lb/lb_base.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ apiVersion: v1
22
kind: Service
33
metadata:
44
name: octavia-basic
5-
annotations:
6-
loadbalancer.ovhcloud.com/class: "octavia"
75
labels:
86
app: test-octavia
97
spec:

containers-orchestration/managed-kubernetes/use-public-cloud-load-balancer/basic_lb_with_flavor/lb_flavor.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ kind: Service
33
metadata:
44
name: octavia-medium
55
annotations:
6-
loadbalancer.ovhcloud.com/class: "octavia"
76
loadbalancer.ovhcloud.com/flavor: "medium"
87
labels:
98
app: test-octavia
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Basic nginx Deployment
2+
3+
## Description
4+
Here is a basic example a nginx Deployment that can be use for demo and test of Public Cloud Load Balancer.
5+
Once the Deployment is created your nginx will be internally exposed on port 80 so you can use the ![Basic LB](./basic_lb/lb_base.yaml) in order to forward trafic from LB listener (port 80) to Kubernetes internal nginx (port 80).
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Install Nginx Ingress Controller on OVHcloud Managed Kubernetes Service
2+
3+
## Description
4+
5+
This documentation explains how to deploy the [Nginx Ingress Controller](https://kubernetes.github.io/ingress-nginx/) on **OVHcloud Managed Kubernetes Service**.
6+
The Ingress Controller enables you to expose your HTTP(S) applications running inside the cluster by defining Kubernetes Ingress resources.
7+
8+
---
9+
10+
## Prerequisites
11+
12+
- An existing **OVHcloud Managed Kubernetes cluster** (
13+
- **kubectl** installed and configured with your cluster credentials.
14+
- **Helm** installed ([Installation guide](https://helm.sh/docs/intro/install/)).
15+
- **Cert-Manager** installed for TLS certificate management ([Documentation](https://cert-manager.io/docs/)).
16+
17+
---
18+
19+
## Installation
20+
21+
1. **Add the Helm repository for ingress-nginx**:
22+
```bash
23+
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
24+
helm repo update
25+
```
26+
27+
2. **Deploy Nginx Ingress Controller** in your cluster:
28+
```bash
29+
helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx --namespace ingress-nginx --create-namespace --values ./values.yaml
30+
```
31+
3. **Deploy the ClusterIssuer for Cert-Manager**:
32+
Deploy the ClusterIssuer as described on `acme-config.yml` :
33+
```yaml
34+
apiVersion: cert-manager.io/v1
35+
kind: ClusterIssuer
36+
metadata:
37+
name: main
38+
spec:
39+
acme:
40+
# The ACME server URL
41+
server: https://acme-v02.api.letsencrypt.org/directory
42+
# Email address used for ACME registration
43+
44+
# Name of a secret used to store the ACME account private key
45+
privateKeySecretRef:
46+
name: letsencrypt-prod
47+
# Enable the HTTP-01 challenge provider
48+
solvers:
49+
- http01:
50+
ingress:
51+
class: nginx
52+
```
53+
54+
To do so, apply it using:
55+
```bash
56+
kubectl apply -f acme-config.yml
57+
```
58+
---
59+
60+
## Verification
61+
62+
Check that the Ingress Controller pods are running:
63+
```bash
64+
kubectl get pods -n ingress-nginx
65+
```
66+
67+
Retrieve the **external IP or hostname** automatically provisioned by OVHcloud LoadBalancer:
68+
```bash
69+
kubectl get svc ingress-nginx-controller -n ingress-nginx
70+
```
71+
72+
⚠️ On OVHcloud Managed Kubernetes Service, the LoadBalancer service type automatically provisions an external IP from OVHcloud infrastructure. This IP/hostname must be configured in your DNS records.
73+
74+
---
75+
76+
## Next Steps
77+
78+
1. **Configure your DNS records**:
79+
Point your application’s domain name (e.g. `myapp.example.com`) to the LoadBalancer external IP/hostname obtained in the previous step.
80+
81+
2. **Create an Ingress resource** to route traffic to your application.
82+
Deploy your Ingress using the example `ingress_base.yaml` with TLS using Cert-Manager and Let’s Encrypt:
83+
```yaml
84+
apiVersion: networking.k8s.io/v1
85+
kind: Ingress
86+
metadata:
87+
annotations:
88+
cert-manager.io/cluster-issuer: "main"
89+
name: ngx-deploy-ingress
90+
spec:
91+
ingressClassName: nginx
92+
tls:
93+
- hosts:
94+
- myapp.example.com
95+
secretName: octavia-secret
96+
rules:
97+
- host: myapp.example.com
98+
http:
99+
paths:
100+
- path: /
101+
pathType: Prefix
102+
backend:
103+
service:
104+
name: nginx-deployment
105+
port:
106+
number: 80
107+
```
108+
109+
---
110+
111+
## Useful Links
112+
- [Nginx Ingress Controller Documentation](https://kubernetes.github.io/ingress-nginx/)
113+
- [Helm Documentation](https://helm.sh/docs/)
114+
- [Cert-Manager Documentation](https://cert-manager.io/docs/)

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ kind: Service
44
metadata:
55
name: octavia-private
66
annotations:
7-
loadbalancer.ovhcloud.com/class: "octavia"
87
service.beta.kubernetes.io/openstack-internal-load-balancer: "true"
98
labels:
109
app: test-octavia

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ kind: Service
44
metadata:
55
name: octavia-private-with-openstack-port
66
annotations:
7-
loadbalancer.ovhcloud.com/class: "octavia"
87
service.beta.kubernetes.io/openstack-internal-load-balancer: "true"
98
loadbalancer.openstack.org/port-id: "4c758644-af77-4e60-9e24-bc5e67295ac0"
109
labels:

containers-orchestration/managed-kubernetes/use-public-cloud-load-balancer/readme.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ metadata:
5757
name: test-lb-service
5858
namespace: test-lb-ns
5959
annotations:
60-
loadbalancer.ovhcloud.com/class: "octavia"
6160
loadbalancer.ovhcloud.com/flavor: "small"
6261
spec:
6362
ports:

containers-orchestration/managed-kubernetes/use-public-cloud-load-balancer/resize_lb/1_small_service.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ apiVersion: v1
22
kind: Service
33
metadata:
44
name: octavia-small-to-upgrade
5-
annotations:
6-
loadbalancer.ovhcloud.com/class: "octavia"
7-
# Default flavor is small
85
labels:
96
app: test-octavia
107
spec:

containers-orchestration/managed-kubernetes/use-public-cloud-load-balancer/resize_lb/2_small_service.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ kind: Service
33
metadata:
44
name: octavia-small-to-upgrade
55
annotations:
6-
loadbalancer.ovhcloud.com/class: "octavia"
76
loadbalancer.openstack.org/keep-floatingip: "true" # Post-adding the keep-floatingip annotation
87
labels:
98
app: test-octavia

containers-orchestration/managed-kubernetes/use-public-cloud-load-balancer/resize_lb/3_medium_service_deploy.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ apiVersion: v1
44
kind: Service
55
metadata:
66
name: octavia-medium-upgraded
7-
annotations:
8-
loadbalancer.ovhcloud.com/class: "octavia"
97
labels:
108
app: test-octavia
119
spec:

0 commit comments

Comments
 (0)