-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
language-fr: setup custom-cloud kubespray
- Loading branch information
Smaine Kahlouch
committed
Feb 15, 2019
1 parent
fcea562
commit fd9d786
Showing
1 changed file
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
--- | ||
title: Installer Kubernetes avec Kubespray (on-premises et Clouds) | ||
content_template: templates/concept | ||
--- | ||
|
||
{{% capture overview %}} | ||
|
||
Cette documentation permet d'installer rapidement un cluster Kubernetes hébergé sur GCE, Azure, Openstack, AWS, vSphere, Oracle Cloud Infrastructure (experimental) ou sur des serveurs physiques (bare metal) grace à [Kubespray](https://github.com/kubernetes-incubator/kubespray). | ||
|
||
Kubespray se base sur des outils de provisioning, des playbooks et [paramètres](https://github.com/kubernetes-incubator/kubespray/blob/master/docs/ansible.md) [Ansible](http://docs.ansible.com/) ainsi que sur des connaissances spécifiques à l'installation de systèmes d'exploitation et de Kubernetes afin de fournir: | ||
|
||
* Un cluster en haute disponibilité | ||
* de composants modulables | ||
* Le support des principales distributions Linux: | ||
* Container Linux by CoreOS | ||
* Debian Jessie, Stretch, Wheezy | ||
* Ubuntu 16.04, 18.04 | ||
* CentOS/RHEL 7 | ||
* Fedora/CentOS Atomic | ||
* openSUSE Leap 42.3/Tumbleweed | ||
* des tests d'intégration continue | ||
|
||
Afin de choiser l'outil le mieux adapté à votre besoin, veuillez lire [cette comparaison](https://github.com/kubernetes-incubator/kubespray/blob/master/docs/comparisons.md) avec [kubeadm](/docs/admin/kubeadm/) et [kops](../kops). | ||
|
||
{{% /capture %}} | ||
|
||
{{% capture body %}} | ||
|
||
## Créer un cluster | ||
|
||
### (1/5) Prérequis | ||
|
||
Les serveurs doivent être installés en s'assurant des éléments suivants: | ||
|
||
* **Ansible v2.6 (ou version plus récente) and python-netaddr installés sur la machine qui exécutera les commandes Ansible** | ||
* **Jinja 2.9 (ou version plus récente) est nécessaire pour exécuter les playbooks Ansible** | ||
* Les serveurs cibles doivent avoir accès à Internet afin de télécharger les images Docker. Autrement, une configuration supplémentaire est nécessaire, (se réferer à [Offline Environment](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/downloads.md#offline-environment)) | ||
* Les serveurs cibles doivent être configurés afin d'autoriser le transfert IPv4 (**IPv4 forwarding**) | ||
* **Votre clé ssh doit être copiée** sur tous les serveurs faisant partie de votre inventaire Ansible. | ||
* La configuration du **pare-feu n'est pas gérée**. Vous devrez vous en charger en utilisant votre méthode habituelle. Afin d'éviter tout problème pendant l'installation nous vous conseillons de le désacativer. | ||
* Si Kubespray est exécuté avec un utilisateur autre que "root", une méthode d'autorisation appropriée devra être configurée sur les serveurs cibles (exemple: sudo). Il faudra aussi utiliser le paramètre `ansible_become` ou ajouter `--become` ou `b` à la ligne de commande. | ||
|
||
Kubespray provides the following utilities to help provision your environment: | ||
|
||
* [Terraform](https://www.terraform.io/) scripts for the following cloud providers: | ||
* [AWS](https://github.com/kubernetes-incubator/kubespray/tree/master/contrib/terraform/aws) | ||
* [OpenStack](https://github.com/kubernetes-incubator/kubespray/tree/master/contrib/terraform/openstack) | ||
|
||
### (2/5) Compose an inventory file | ||
|
||
After you provision your servers, create an [inventory file for Ansible](http://docs.ansible.com/ansible/intro_inventory.html). You can do this manually or via a dynamic inventory script. For more information, see "[Building your own inventory](https://github.com/kubernetes-incubator/kubespray/blob/master/docs/getting-started.md#building-your-own-inventory)". | ||
|
||
### (3/5) Plan your cluster deployment | ||
|
||
Kubespray provides the ability to customize many aspects of the deployment: | ||
|
||
* Choice deployment mode: kubeadm or non-kubeadm | ||
* CNI (networking) plugins | ||
* DNS configuration | ||
* Choice of control plane: native/binary or containerized with docker or rkt | ||
* Component versions | ||
* Calico route reflectors | ||
* Component runtime options | ||
* docker | ||
* rkt | ||
* cri-o | ||
* Certificate generation methods (**Vault being discontinued**) | ||
|
||
Kubespray customizations can be made to a [variable file](http://docs.ansible.com/ansible/playbooks_variables.html). If you are just getting started with Kubespray, consider using the Kubespray defaults to deploy your cluster and explore Kubernetes. | ||
|
||
### (4/5) Deploy a Cluster | ||
|
||
Next, deploy your cluster: | ||
|
||
Cluster deployment using [ansible-playbook](https://github.com/kubernetes-incubator/kubespray/blob/master/docs/getting-started.md#starting-custom-deployment). | ||
|
||
```shell | ||
ansible-playbook -i your/inventory/hosts.ini cluster.yml -b -v \ | ||
--private-key=~/.ssh/private_key | ||
``` | ||
|
||
Large deployments (100+ nodes) may require [specific adjustments](https://github.com/kubernetes-incubator/kubespray/blob/master/docs/large-deployments.md) for best results. | ||
|
||
### (5/5) Verify the deployment | ||
|
||
Kubespray provides a way to verify inter-pod connectivity and DNS resolve with [Netchecker](https://github.com/kubernetes-incubator/kubespray/blob/master/docs/netcheck.md). Netchecker ensures the netchecker-agents pods can resolve DNS requests and ping each over within the default namespace. Those pods mimic similar behavior of the rest of the workloads and serve as cluster health indicators. | ||
|
||
## Cluster operations | ||
|
||
Kubespray provides additional playbooks to manage your cluster: _scale_ and _upgrade_. | ||
|
||
### Scale your cluster | ||
|
||
You can add worker nodes from your cluster by running the scale playbook. For more information, see "[Adding nodes](https://github.com/kubernetes-incubator/kubespray/blob/master/docs/getting-started.md#adding-nodes)". | ||
You can remove worker nodes from your cluster by running the remove-node playbook. For more information, see "[Remove nodes](https://github.com/kubernetes-incubator/kubespray/blob/master/docs/getting-started.md#remove-nodes)". | ||
|
||
### Upgrade your cluster | ||
|
||
You can upgrade your cluster by running the upgrade-cluster playbook. For more information, see "[Upgrades](https://github.com/kubernetes-incubator/kubespray/blob/master/docs/upgrades.md)". | ||
|
||
## Cleanup | ||
|
||
You can reset your nodes and wipe out all components installed with Kubespray via the [reset playbook](https://github.com/kubernetes-incubator/kubespray/blob/master/reset.yml). | ||
|
||
{{< caution >}} | ||
When running the reset playbook, be sure not to accidentally target your production cluster! | ||
{{< /caution >}} | ||
|
||
## Feedback | ||
|
||
* Slack Channel: [#kubespray](https://kubernetes.slack.com/messages/kubespray/) | ||
* [GitHub Issues](https://github.com/kubernetes-incubator/kubespray/issues) | ||
|
||
{{% /capture %}} | ||
|
||
{{% capture whatsnext %}} | ||
|
||
Check out planned work on Kubespray's [roadmap](https://github.com/kubernetes-incubator/kubespray/blob/master/docs/roadmap.md). | ||
|
||
{{% /capture %}} |