Merge pull request #41942 from windsonsea/spray
Tweak line wrappings in kops, kubespray, and dual-stack-supportpull/41961/head
commit
f727fee544
|
@ -14,9 +14,12 @@ It uses a tool called [`kOps`](https://github.com/kubernetes/kops).
|
|||
* Fully automated installation
|
||||
* Uses DNS to identify clusters
|
||||
* Self-healing: everything runs in Auto-Scaling Groups
|
||||
* Multiple OS support (Amazon Linux, Debian, Flatcar, RHEL, Rocky and Ubuntu) - see the [images.md](https://github.com/kubernetes/kops/blob/master/docs/operations/images.md)
|
||||
* High-Availability support - see the [high_availability.md](https://github.com/kubernetes/kops/blob/master/docs/operations/high_availability.md)
|
||||
* Can directly provision, or generate terraform manifests - see the [terraform.md](https://github.com/kubernetes/kops/blob/master/docs/terraform.md)
|
||||
* Multiple OS support (Amazon Linux, Debian, Flatcar, RHEL, Rocky and Ubuntu) - see the
|
||||
[images.md](https://github.com/kubernetes/kops/blob/master/docs/operations/images.md)
|
||||
* High-Availability support - see the
|
||||
[high_availability.md](https://github.com/kubernetes/kops/blob/master/docs/operations/high_availability.md)
|
||||
* Can directly provision, or generate terraform manifests - see the
|
||||
[terraform.md](https://github.com/kubernetes/kops/blob/master/docs/terraform.md)
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
@ -24,7 +27,10 @@ It uses a tool called [`kOps`](https://github.com/kubernetes/kops).
|
|||
|
||||
* You must [install](https://github.com/kubernetes/kops#installing) `kops` on a 64-bit (AMD64 and Intel 64) device architecture.
|
||||
|
||||
* You must have an [AWS account](https://docs.aws.amazon.com/polly/latest/dg/setting-up.html), generate [IAM keys](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys) and [configure](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html#cli-quick-configuration) them. The IAM user will need [adequate permissions](https://github.com/kubernetes/kops/blob/master/docs/getting_started/aws.md#setup-iam-user).
|
||||
* You must have an [AWS account](https://docs.aws.amazon.com/polly/latest/dg/setting-up.html),
|
||||
generate [IAM keys](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys)
|
||||
and [configure](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html#cli-quick-configuration) them.
|
||||
The IAM user will need [adequate permissions](https://github.com/kubernetes/kops/blob/master/docs/getting_started/aws.md#setup-iam-user).
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
|
@ -34,7 +40,8 @@ It uses a tool called [`kOps`](https://github.com/kubernetes/kops).
|
|||
|
||||
#### Installation
|
||||
|
||||
Download kops from the [releases page](https://github.com/kubernetes/kops/releases) (it is also convenient to build from source):
|
||||
Download kops from the [releases page](https://github.com/kubernetes/kops/releases)
|
||||
(it is also convenient to build from source):
|
||||
|
||||
{{< tabs name="kops_installation" >}}
|
||||
{{% tab name="macOS" %}}
|
||||
|
@ -212,7 +219,8 @@ for production clusters!
|
|||
|
||||
### Explore other add-ons
|
||||
|
||||
See the [list of add-ons](/docs/concepts/cluster-administration/addons/) to explore other add-ons, including tools for logging, monitoring, network policy, visualization, and control of your Kubernetes cluster.
|
||||
See the [list of add-ons](/docs/concepts/cluster-administration/addons/) to explore other add-ons,
|
||||
including tools for logging, monitoring, network policy, visualization, and control of your Kubernetes cluster.
|
||||
|
||||
## Cleanup
|
||||
|
||||
|
@ -221,6 +229,8 @@ See the [list of add-ons](/docs/concepts/cluster-administration/addons/) to expl
|
|||
## {{% heading "whatsnext" %}}
|
||||
|
||||
* Learn more about Kubernetes [concepts](/docs/concepts/) and [`kubectl`](/docs/reference/kubectl/).
|
||||
* Learn more about `kOps` [advanced usage](https://kops.sigs.k8s.io/) for tutorials, best practices and advanced configuration options.
|
||||
* Follow `kOps` community discussions on Slack: [community discussions](https://github.com/kubernetes/kops#other-ways-to-communicate-with-the-contributors).
|
||||
* Learn more about `kOps` [advanced usage](https://kops.sigs.k8s.io/) for tutorials,
|
||||
best practices and advanced configuration options.
|
||||
* Follow `kOps` community discussions on Slack:
|
||||
[community discussions](https://github.com/kubernetes/kops#other-ways-to-communicate-with-the-contributors).
|
||||
* Contribute to `kOps` by addressing or raising an issue [GitHub Issues](https://github.com/kubernetes/kops/issues).
|
||||
|
|
|
@ -9,15 +9,21 @@ min-kubernetes-server-version: 1.21
|
|||
|
||||
{{< feature-state for_k8s_version="v1.23" state="stable" >}}
|
||||
|
||||
Your Kubernetes cluster includes [dual-stack](/docs/concepts/services-networking/dual-stack/) networking, which means that cluster networking lets you use either address family. In a cluster, the control plane can assign both an IPv4 address and an IPv6 address to a single {{< glossary_tooltip text="Pod" term_id="pod" >}} or a {{< glossary_tooltip text="Service" term_id="service" >}}.
|
||||
Your Kubernetes cluster includes [dual-stack](/docs/concepts/services-networking/dual-stack/)
|
||||
networking, which means that cluster networking lets you use either address family.
|
||||
In a cluster, the control plane can assign both an IPv4 address and an IPv6 address to a single
|
||||
{{< glossary_tooltip text="Pod" term_id="pod" >}} or a {{< glossary_tooltip text="Service" term_id="service" >}}.
|
||||
|
||||
<!-- body -->
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
You need to have installed the {{< glossary_tooltip text="kubeadm" term_id="kubeadm" >}} tool, following the steps from [Installing kubeadm](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/).
|
||||
You need to have installed the {{< glossary_tooltip text="kubeadm" term_id="kubeadm" >}} tool,
|
||||
following the steps from [Installing kubeadm](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/).
|
||||
|
||||
For each server that you want to use as a {{< glossary_tooltip text="node" term_id="node" >}}, make sure it allows IPv6 forwarding. On Linux, you can set this by running run `sysctl -w net.ipv6.conf.all.forwarding=1` as the root user on each server.
|
||||
For each server that you want to use as a {{< glossary_tooltip text="node" term_id="node" >}},
|
||||
make sure it allows IPv6 forwarding. On Linux, you can set this by running run
|
||||
`sysctl -w net.ipv6.conf.all.forwarding=1` as the root user on each server.
|
||||
|
||||
You need to have an IPv4 and and IPv6 address range to use. Cluster operators typically
|
||||
use private address ranges for IPv4. For IPv6, a cluster operator typically chooses a global
|
||||
|
@ -65,7 +71,9 @@ nodeRegistration:
|
|||
node-ip: 10.100.0.2,fd00:1:2:3::2
|
||||
```
|
||||
|
||||
`advertiseAddress` in InitConfiguration specifies the IP address that the API Server will advertise it is listening on. The value of `advertiseAddress` equals the `--apiserver-advertise-address` flag of `kubeadm init`
|
||||
`advertiseAddress` in InitConfiguration specifies the IP address that the API Server
|
||||
will advertise it is listening on. The value of `advertiseAddress` equals the
|
||||
`--apiserver-advertise-address` flag of `kubeadm init`.
|
||||
|
||||
Run kubeadm to initiate the dual-stack control plane node:
|
||||
|
||||
|
@ -73,7 +81,8 @@ Run kubeadm to initiate the dual-stack control plane node:
|
|||
kubeadm init --config=kubeadm-config.yaml
|
||||
```
|
||||
|
||||
The kube-controller-manager flags `--node-cidr-mask-size-ipv4|--node-cidr-mask-size-ipv6` are set with default values. See [configure IPv4/IPv6 dual stack](/docs/concepts/services-networking/dual-stack#configure-ipv4-ipv6-dual-stack).
|
||||
The kube-controller-manager flags `--node-cidr-mask-size-ipv4|--node-cidr-mask-size-ipv6`
|
||||
are set with default values. See [configure IPv4/IPv6 dual stack](/docs/concepts/services-networking/dual-stack#configure-ipv4-ipv6-dual-stack).
|
||||
|
||||
{{< note >}}
|
||||
The `--apiserver-advertise-address` flag does not support dual-stack.
|
||||
|
@ -124,7 +133,9 @@ nodeRegistration:
|
|||
|
||||
```
|
||||
|
||||
`advertiseAddress` in JoinConfiguration.controlPlane specifies the IP address that the API Server will advertise it is listening on. The value of `advertiseAddress` equals the `--apiserver-advertise-address` flag of `kubeadm join`.
|
||||
`advertiseAddress` in JoinConfiguration.controlPlane specifies the IP address that the
|
||||
API Server will advertise it is listening on. The value of `advertiseAddress` equals
|
||||
the `--apiserver-advertise-address` flag of `kubeadm join`.
|
||||
|
||||
```shell
|
||||
kubeadm join --config=kubeadm-config.yaml
|
||||
|
|
|
@ -6,11 +6,16 @@ weight: 30
|
|||
|
||||
<!-- overview -->
|
||||
|
||||
This quickstart helps to install a Kubernetes cluster hosted on GCE, Azure, OpenStack, AWS, vSphere, Equinix Metal (formerly Packet), Oracle Cloud Infrastructure (Experimental) or Baremetal with [Kubespray](https://github.com/kubernetes-sigs/kubespray).
|
||||
This quickstart helps to install a Kubernetes cluster hosted on GCE, Azure, OpenStack,
|
||||
AWS, vSphere, Equinix Metal (formerly Packet), Oracle Cloud Infrastructure (Experimental)
|
||||
or Baremetal with [Kubespray](https://github.com/kubernetes-sigs/kubespray).
|
||||
|
||||
Kubespray is a composition of [Ansible](https://docs.ansible.com/) playbooks, [inventory](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/ansible.md#inventory), provisioning tools, and domain knowledge for generic OS/Kubernetes clusters configuration management tasks.
|
||||
Kubespray is a composition of [Ansible](https://docs.ansible.com/) playbooks,
|
||||
[inventory](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/ansible.md#inventory),
|
||||
provisioning tools, and domain knowledge for generic OS/Kubernetes clusters configuration management tasks.
|
||||
|
||||
Kubespray provides:
|
||||
|
||||
* Highly available cluster.
|
||||
* Composable (Choice of the network plugin for instance).
|
||||
* Supports most popular Linux distributions:
|
||||
|
@ -28,7 +33,8 @@ Kubespray provides:
|
|||
- Amazon Linux 2
|
||||
* Continuous integration tests.
|
||||
|
||||
To choose a tool which best fits your use case, read [this comparison](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/comparisons.md) to
|
||||
To choose a tool which best fits your use case, read
|
||||
[this comparison](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/comparisons.md) to
|
||||
[kubeadm](/docs/reference/setup-tools/kubeadm/) and [kops](/docs/setup/production-environment/tools/kops/).
|
||||
|
||||
<!-- body -->
|
||||
|
@ -44,8 +50,11 @@ Provision servers with the following [requirements](https://github.com/kubernete
|
|||
* The target servers must have **access to the Internet** in order to pull docker images. Otherwise, additional configuration is required See ([Offline Environment](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/offline-environment.md))
|
||||
* The target servers are configured to allow **IPv4 forwarding**.
|
||||
* If using IPv6 for pods and services, the target servers are configured to allow **IPv6 forwarding**.
|
||||
* 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 run 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.
|
||||
* 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 run 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:
|
||||
|
||||
|
@ -56,7 +65,10 @@ Kubespray provides the following utilities to help provision your environment:
|
|||
|
||||
### (2/5) Compose an inventory file
|
||||
|
||||
After you provision your servers, create an [inventory file for Ansible](https://docs.ansible.com/ansible/latest/network/getting_started/first_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-sigs/kubespray/blob/master/docs/getting-started.md#building-your-own-inventory)".
|
||||
After you provision your servers, create an
|
||||
[inventory file for Ansible](https://docs.ansible.com/ansible/latest/network/getting_started/first_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-sigs/kubespray/blob/master/docs/getting-started.md#building-your-own-inventory)".
|
||||
|
||||
### (3/5) Plan your cluster deployment
|
||||
|
||||
|
@ -74,24 +86,34 @@ Kubespray provides the ability to customize many aspects of the deployment:
|
|||
* {{< glossary_tooltip term_id="cri-o" >}}
|
||||
* Certificate generation methods
|
||||
|
||||
Kubespray customizations can be made to a [variable file](https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html). If you are getting started with Kubespray, consider using the Kubespray defaults to deploy your cluster and explore Kubernetes.
|
||||
Kubespray customizations can be made to a
|
||||
[variable file](https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html).
|
||||
If you are 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-sigs/kubespray/blob/master/docs/getting-started.md#starting-custom-deployment).
|
||||
Cluster deployment using
|
||||
[ansible-playbook](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/getting-started.md#starting-custom-deployment).
|
||||
|
||||
```shell
|
||||
ansible-playbook -i your/inventory/inventory.ini cluster.yml -b -v \
|
||||
--private-key=~/.ssh/private_key
|
||||
```
|
||||
|
||||
Large deployments (100+ nodes) may require [specific adjustments](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/large-deployments.md) for best results.
|
||||
Large deployments (100+ nodes) may require
|
||||
[specific adjustments](https://github.com/kubernetes-sigs/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-sigs/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 as the rest of the workloads and serve as cluster health indicators.
|
||||
Kubespray provides a way to verify inter-pod connectivity and DNS resolve with
|
||||
[Netchecker](https://github.com/kubernetes-sigs/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 as the rest
|
||||
of the workloads and serve as cluster health indicators.
|
||||
|
||||
## Cluster operations
|
||||
|
||||
|
@ -99,16 +121,20 @@ Kubespray provides additional playbooks to manage your cluster: _scale_ and _upg
|
|||
|
||||
### 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-sigs/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-sigs/kubespray/blob/master/docs/getting-started.md#remove-nodes)".
|
||||
You can add worker nodes from your cluster by running the scale playbook. For more information,
|
||||
see "[Adding nodes](https://github.com/kubernetes-sigs/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-sigs/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-sigs/kubespray/blob/master/docs/upgrades.md)".
|
||||
You can upgrade your cluster by running the upgrade-cluster playbook. For more information,
|
||||
see "[Upgrades](https://github.com/kubernetes-sigs/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-sigs/kubespray/blob/master/reset.yml).
|
||||
You can reset your nodes and wipe out all components installed with Kubespray
|
||||
via the [reset playbook](https://github.com/kubernetes-sigs/kubespray/blob/master/reset.yml).
|
||||
|
||||
{{< caution >}}
|
||||
When running the reset playbook, be sure not to accidentally target your production cluster!
|
||||
|
@ -116,7 +142,8 @@ When running the reset playbook, be sure not to accidentally target your product
|
|||
|
||||
## Feedback
|
||||
|
||||
* Slack Channel: [#kubespray](https://kubernetes.slack.com/messages/kubespray/) (You can get your invite [here](https://slack.k8s.io/)).
|
||||
* Slack Channel: [#kubespray](https://kubernetes.slack.com/messages/kubespray/)
|
||||
(You can get your invite [here](https://slack.k8s.io/)).
|
||||
* [GitHub Issues](https://github.com/kubernetes-sigs/kubespray/issues).
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
|
Loading…
Reference in New Issue