From cc936483774ede61d6560df364e86e6b44a5ad13 Mon Sep 17 00:00:00 2001 From: makocchi Date: Tue, 21 Aug 2018 23:42:24 +0900 Subject: [PATCH] apply template and update requirements (#9963) --- .../en/docs/setup/custom-cloud/kubespray.md | 46 +++++++++++-------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/content/en/docs/setup/custom-cloud/kubespray.md b/content/en/docs/setup/custom-cloud/kubespray.md index 2558708220..bdb12744e2 100644 --- a/content/en/docs/setup/custom-cloud/kubespray.md +++ b/content/en/docs/setup/custom-cloud/kubespray.md @@ -1,11 +1,12 @@ --- title: Installing Kubernetes On-premises/Cloud Providers with Kubespray +content_template: templates/concept --- -## Overview +{{% capture overview %}} This quickstart helps to install a Kubernetes cluster hosted on GCE, Azure, OpenStack, AWS, or Baremetal with [Kubespray](https://github.com/kubernetes-incubator/kubespray). - + Kubespray is a composition of [Ansible](http://docs.ansible.com/) playbooks, [inventory](https://github.com/kubernetes-incubator/kubespray/blob/master/docs/ansible.md), provisioning tools, and domain knowledge for generic OS/Kubernetes clusters configuration management tasks. Kubespray provides: * a highly available cluster @@ -15,22 +16,23 @@ Kubespray is a composition of [Ansible](http://docs.ansible.com/) playbooks, [in To choose a tool which best fits your use case, read [this comparison](https://github.com/kubernetes-incubator/kubespray/blob/master/docs/comparisons.md) to [kubeadm](/docs/admin/kubeadm/) and [kops](../kops). +{{% /capture %}} + +{{% capture body %}} + ## Creating a cluster -### (1/5) Meet the underlay [requirements](https://github.com/kubernetes-incubator/kubespray#requirements) +### (1/5) Meet the underlay requirements -Provision servers with the following requirements: +Provision servers with the following [requirements](https://github.com/kubernetes-incubator/kubespray#requirements): -* `Ansible v2.4` (or newer) -* `Jinja 2.9` (or newer) -* `python-netaddr` installed on the machine that running Ansible commands -* Target servers must have access to the Internet in order to pull docker images -* Target servers are configured to allow IPv4 forwarding -* Target servers have SSH connectivity ( tcp/22 ) directly to your nodes or through a bastion host/ssh jump box -* Target servers have a privileged user -* Your SSH key must be copied to all the servers that are part of your inventory -* Firewall rules configured properly to allow Ansible and Kubernetes components to communicate -* If using a cloud provider, you must have the appropriate credentials available and exported as environment variables +* **Ansible v2.4 (or newer) and python-netaddr is installed on the machine that will run Ansible commands** +* **Jinja 2.9 (or newer) is required to run the Ansible Playbooks** +* The target servers must have **access to the Internet** in order to pull docker images +* The target servers are configured to allow **IPv4 forwarding** +* **Your ssh key must be copied** to all the servers part of your inventory +* The **firewalls are not managed**, you'll need to implement your own rules the way you used to. in order to avoid any issue during deployment you should disable your firewall +* If kubespray is ran from non-root user account, correct privilege escalation method should be configured in the target servers. Then the `ansible_become` flag or command parameters `--become` or `-b` should be specified Kubespray provides the following utilities to help provision your environment: @@ -61,12 +63,12 @@ Kubespray customizations can be made to a [variable file](http://docs.ansible.co Next, deploy your cluster: Cluster deployment using [ansible-playbook](https://github.com/kubernetes-incubator/kubespray/blob/master/docs/getting-started.md#starting-custom-deployment). -```console + +```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 @@ -86,10 +88,6 @@ You can remove worker nodes from your cluster by running the remove-node playboo 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)". -## What's next - -Check out planned work on Kubespray's [roadmap](https://github.com/kubernetes-incubator/kubespray/blob/master/docs/roadmap.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). @@ -102,3 +100,11 @@ You can reset your nodes and wipe out all components installed with Kubespray vi * 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 %}}