Skip to content

Conversation

@scraly
Copy link
Collaborator

@scraly scraly commented Dec 4, 2025

This PR show how to:

  • create a load balancer using TF and ask to create a floating IP
  • deploy to a mks cluster a deployment and a service (linked/attached to the created LB)

Kind of the Pull Request

  • ✨ New demos ✨

Products targeted

  • ⎈ Containers & Orchestration (Kubernetes, Registry, Rancher...) ⎈
  • 🛜 Network 🛜
  • 🏗️ IaC 🏗️

Purpose of this Pull Request

  • detailed README provided

@scraly scraly requested a review from philippart-s December 4, 2025 14:44
Copy link
Collaborator

@philippart-s philippart-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just few typos to fix 😉

@@ -0,0 +1,97 @@
## Create a LB with TF and use it in a MKS service

/!\ Warning: works only on MKS Standard for th emoment!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/!\ Warning: works only on MKS Standard for th emoment!
/!\ Warning: works only on MKS Standard for th moment!

kubectl apply -f svc.yaml -n demo-attach-ip
```

- check the service is atatched to the LB (and have an external IP):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- check the service is atatched to the LB (and have an external IP):
- check the service is attached to the LB (and have an external IP):

kubectl get deploy,svc -n demo-attach-ip
```

Note please wait several seconds to obtain the EXTERNAL-IP
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Note please wait several seconds to obtain the EXTERNAL-IP
Note: please wait several seconds to obtain the EXTERNAL-IP

}

variable region {
//default = "GRA11" //1AZ - Free
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it's not compatible with free mode at the moment, I think it's better to remove this comment for the moment?

resource "ovh_cloud_project_loadbalancer" "lb" {
service_name = ovh_cloud_project_network_private_subnet.privsub.service_name
region_name = ovh_cloud_project_network_private_subnet.privsub.region
//flavor_id = "31990104-8a7b-4d8f-a728-9c4cfd14fe72" # small flavor on GRA11 region
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it's not used perhaps you should remove this line?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants