forked from k0sproject/k0s
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configuration docs technical writer updates (k0sproject#883)
* Twriter edits to k0s Configuration content. Signed-off-by: KoryKessel-Docker <[email protected]> * Edit in response to first wave of comments. Signed-off-by: KoryKessel-Mirantis <[email protected]> * Small fix to merge conflict (moved Configuation Validation to a separate topic). Signed-off-by: KoryKessel-Mirantis <[email protected]>
- Loading branch information
1 parent
b9c534c
commit d58cbef
Showing
11 changed files
with
286 additions
and
268 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 |
---|---|---|
@@ -1,20 +1,16 @@ | ||
# Using cloud providers | ||
|
||
k0s builds Kubernetes components in "providerless" mode. This means that there is no cloud providers built into k0s managed Kubernetes components. | ||
k0s builds Kubernetes components in *providerless* mode, meaning that cloud providers are not built into k0s-managed Kubernetes components. As such, you must externally configure the cloud providers to enable their support in your k0s cluster (for more information on running Kubernetes with cloud providers, refer to the [Kubernetes documentation](https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/). | ||
|
||
This means the cloud providers have to be configured "externally". The following steps outline how to enable cloud providers support in your k0s cluster. | ||
## 1. Enable cloud provider support in kubelet | ||
|
||
For more information on running Kubernetes with cloud providers see the [official documentation](https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/). | ||
Even when all components are built with providerless mode, you must be able to enable cloud provider mode for kubelet. To do this, run the workers with `--enable-cloud-provider=true`, to enable `--cloud-provider=external` on the kubelet process. | ||
|
||
## Enabling cloud provider support in kubelet | ||
## 2. Deploy the cloud provider | ||
|
||
Even when all components are built with "providerless" mode, we need to be able to enable cloud provider "mode" for kubelet. This is done by running the workers with `--enable-cloud-provider=true`. This enables `--cloud-provider=external` on kubelet process. | ||
The easiest way to deploy cloud provider controllers is on the k0s cluster. | ||
|
||
## Deploying the actual cloud provider | ||
Use the built-in [manifest deployer](manifests.md) built into k0s to deploy your cloud provider as a k0s-managed stack. Next, just drop all required manifests into the `/var/lib/k0s/manifests/aws/` directory, and k0s will handle the deployment. | ||
|
||
From Kubernetes point of view, it does not really matter how and where the cloud providers controller(s) are running. Of course the easiest way is to deploy them on the cluster itself. | ||
|
||
To deploy your cloud provider as k0s managed stack you can use the built-in [manifest deployer](manifests.md). Simply drop all the needed manifests under e.g. `/var/lib/k0s/manifests/aws/` directory and k0s will deploy everything. | ||
|
||
Some cloud providers do need some configuration files to be present on all the nodes or some other pre-requisites. Consult your cloud providers documentation for needed steps. | ||
**Note**: The prerequisites for the various cloud providers can vary (for example, several require that configuration files be present on all of the nodes). Refer to your chosen cloud provider's documentation as necessary. | ||
|
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,13 @@ | ||
|
||
k0s command-line interface has the ability to validate config syntax: | ||
|
||
``` | ||
$ k0s validate config --config path/to/config/file | ||
``` | ||
|
||
`validate config` sub-command can validate the following: | ||
|
||
1. YAML formatting | ||
2. [SANs addresses](#specapi-1) | ||
3. [Network providers](#specnetwork-1) | ||
4. [Worker profiles](#specworkerprofiles) |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,13 +1,9 @@ | ||
# Custom CRI runtime | ||
|
||
k0s supports users bringing their own CRI runtime (for example, docker). In which case, k0s will not start nor manage the runtime, and it is fully up to the user to configure it properly. | ||
**Warning**: You can use your own CRI runtime with k0s (for example, `docker`), however k0s will not start or manage the runtime, and configuration is solely your responsibility. | ||
|
||
To run a k0s worker with a custom CRI runtime use the option `--cri-socket`. | ||
It takes input in the form of `<type>:<socket>` where: | ||
Use the option `--cri-socket` to run a k0s worker with a custom CRI runtime. the option takes input in the form of `<type>:<socket_path>` (for `type`, use `docker` for a pure Docker setup and `remote` for anything else). | ||
|
||
- `type`: Either `remote` or `docker`. Use `docker` for pure docker setup, `remote` for anything else. | ||
- `socket`: Path to the socket, examples: `unix:///var/run/docker.sock` | ||
To run k0s with a pre-existing Docker setup, run the worker with `k0s worker --cri-socket docker:unix:///var/run/docker.sock <token>`. | ||
|
||
To run k0s with pre-existing docker setup run the worker with `k0s worker --cri-socket docker:unix:///var/run/docker.sock <token>`. | ||
|
||
When `docker` is used as a runtime, k0s will configure kubelet to create the dockershim socket at `/var/run/dockershim.sock`. | ||
When `docker` is used as a runtime, k0s configures kubelet to create the dockershim socket at `/var/run/dockershim.sock`. |
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
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 |
---|---|---|
@@ -1,23 +1,22 @@ | ||
## Control Plane High Availability | ||
# Control Plane High Availability | ||
|
||
The following pre-requisites are required in order to configure an HA control plane: | ||
|
||
### Requirements | ||
##### Load Balancer | ||
A load balancer with a single external address should be configured as the IP gateway for the controllers. | ||
The load balancer should allow traffic to each controller on the following ports: | ||
The configuration of a high availability control plane for k0s requires the deployment of both a load balancer and a cluster configuration file. | ||
|
||
## Load Balancer | ||
|
||
Configure a load balancer with a single external address as the IP gateway for the controllers. Set the load balancer to allow traffic to each controller through the following ports: | ||
|
||
- 6443 | ||
- 8132 | ||
- 8133 | ||
- 9443 | ||
|
||
##### Cluster configuration | ||
On each controller node, a k0s.yaml configuration file should be configured. | ||
The following options need to match on each node, otherwise the control plane components will end up in very unknown states: | ||
## Cluster configuration | ||
|
||
Configure a `k0s.yaml` configuration file for each controller node with the following options: | ||
|
||
- `network` | ||
- `storage`: Needless to say, one cannot create a clustered control plane with each node only storing data locally on SQLite. | ||
- `storage` | ||
- `externalAddress` | ||
|
||
[Full configuration file refrence](configuration.md) | ||
For greater detail, refer to the [Full configuration file reference](configuration.md). |
Oops, something went wrong.