Git Product home page Git Product logo

k8s-cluster-on-ovh's Introduction

Deploy Kubernetes Cluster on OVH using Terraform

Here is a basic setup to deploy a Kubernetes cluster (one master + 2 nodes or 2 minions) using Terraform on OVH public cloud (Openstack based platform). Terraform is a great tool for deploying cloud instances on multiple cloud providers (AWS, Digital Ocean, Google Cloud, OpenStack ...), checkout Hashicorp website for more details about the use cases you can achieve with it. Note : This is NOT a production ready setup, check Kubeadm alpha restriction and concerns

Pre-Requisite

Terraform

Install Terraform on your laptop or build server following instructions given by Hashicorp here

OVH

In order to use OVH Openstack APIs you will need to create specific user credentials in the OVH manager console. (Go to your cloud project, openstack menu, create a user) Ovhmananager

SSH KeyPairs

Terraform will need a reference to a key pair on its hosts, so it can connect to the various instances in a secure way and without having to ask you for server passwords everytime. If you don't know how to create a key pair, follow this link.

HOWTO start it

1. Specify your own credentials

Specify your credentials , edit provider.tf file with your personal credentials, aka "username" and "password"

Edit ressources.tf with your keypair "name", "public_key" and the path to your "private_key" to deploy Kubernetes packages through remote-exec connection process.

2. Create your infrastructure

Use the following command to start building your infrastructure,

terraform apply

Terraform will first, Connect to the OVH provider using the credentials you provided in 1. , Export your SSH keypair to an Openstack object, Create an Ubuntu instance for Kubernetes master, Download associated repo packages, Initialize Kube master Get back the join token in a local file Create 2 Ubuntu instances for Kubernetes nodes or minions, Download associated repo packages, Connect the 2 nodes to master using the token provided by the master instance Return public ips of master and nodes DONE

3. Destroy your infrastructure

You can destroy all the objects created in 2. using the following command :

terraform destroy

And redo it as much as you want !

k8s-cluster-on-ovh's People

Contributors

jayb39 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.