diff --git a/content/rke/v0.1.x/en/config-options/_index.md b/content/rke/v0.1.x/en/config-options/_index.md index 46df6a303a3..097e3bb7c5f 100644 --- a/content/rke/v0.1.x/en/config-options/_index.md +++ b/content/rke/v0.1.x/en/config-options/_index.md @@ -26,10 +26,10 @@ There are several options that can be configured in cluster configuration option * [Authentication]({{< baseurl >}}/rke/v0.1.x/en/config-options/authentication/) * [Authorization]({{< baseurl >}}/rke/v0.1.x/en/config-options/authorization/) * [Cloud Providers]({{< baseurl >}}/rke/v0.1.x/en/config-options/cloud-providers/) -* Add-ons - * [Network Plugins]({{< baseurl >}}/rke/v0.1.x/en/config-options/network-plugins/) - * [Ingress Controller]({{< baseurl >}}/rke/v0.1.x/en/config-options/ingress-controllers/) - * [User-Defined-Add-ons]({{< baseurl >}}/rke/v0.1.x/en/config-options/user-defined-add-ons/) +* [Add-ons]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/) + * [Network Plugins]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/network-plugins/) + * [Ingress Controller]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/ingress-controllers/) + * [User-Defined-Add-ons]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/user-defined-add-ons/) * [Add-ons Jobs Timeout](#add-ons-jobs-timeout) ## Cluster Level Options diff --git a/content/rke/v0.1.x/en/config-options/add-ons/_index.md b/content/rke/v0.1.x/en/config-options/add-ons/_index.md index 5c91488de92..5eff45459d8 100644 --- a/content/rke/v0.1.x/en/config-options/add-ons/_index.md +++ b/content/rke/v0.1.x/en/config-options/add-ons/_index.md @@ -6,10 +6,12 @@ draft: true RKE supports pluggable add-ons. Add-ons are used to deploy several cluster components including: -* [Network plugin]({{< baseurl >}}/rke/v0.1.x/en/config-options/network-plugins/) -* [Ingress controller]({{< baseurl >}}/rke/v0.1.x/en/config-options/ingress-controllers/) +* [Network plug-ins]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/network-plugins/) +* [Ingress controller]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/ingress-controllers/) * KubeDNS +The images used for these add-ons under the [`system_images` directive]({< baseurl >}}/rke/v0.1.x/en/config-options/system-images/). For each Kubernetes version, there are default images associated with each add-on, but these can be overridden by changing the image tag in `system_images`. + In addition to these pluggable add-ons, you can specify an add-on that you want deployed after the cluster deployment is complete. RKE only adds additional add-ons when using `rke up` multiple times. RKE does **not** support removing of cluster add-ons when doing `rke up` with a different list of add-ons. @@ -18,6 +20,7 @@ As of v0.1.8, RKE will update an add-on if it is the same name. Prior to v0.1.8, update any add-ons by by using `kubectl edit`. + ## Critical and Non-Critical Add-ons As of version v0.1.7, add-ons are split into two categories: diff --git a/content/rke/v0.1.x/en/config-options/add-ons/ingress-controllers/_index.md b/content/rke/v0.1.x/en/config-options/add-ons/ingress-controllers/_index.md index bd3caa02760..57427c0b822 100644 --- a/content/rke/v0.1.x/en/config-options/add-ons/ingress-controllers/_index.md +++ b/content/rke/v0.1.x/en/config-options/add-ons/ingress-controllers/_index.md @@ -10,6 +10,8 @@ By default, RKE deploys the nginx ingress controller on all schedulable nodes. RKE will deploy the ingress controller as a DaemonSet with `hostnetwork: true`, so ports `80`, and `443` will be opened on each node where the controller is deployed. +The images used for ingress controller is under the [`system_images` directive]({< baseurl >}}/rke/v0.1.x/en/config-options/system-images/). For each Kubernetes version, there are default images associated with the ingress controller, but these can be overridden by changing the image tag in `system_images`. + ## Scheduling Ingress Controllers If you only wanted ingress controllers to be deployed on specific nodes, you can set a `node_selector` for the ingress. The label in the `node_selector` would need to match the label on the nodes for the ingress controller to be deployed. @@ -40,7 +42,7 @@ ingress: For the configuration of nginx, there are some configuration options. There are a [list of options](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/configmap.md) for the nginx config map and [command line extra_args](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/cli-arguments.md). -``` +```yaml ingress: provider: nginx options: diff --git a/content/rke/v0.1.x/en/config-options/add-ons/network-plugins/_index.md b/content/rke/v0.1.x/en/config-options/add-ons/network-plugins/_index.md index ba5096595a2..f91f50888a1 100644 --- a/content/rke/v0.1.x/en/config-options/add-ons/network-plugins/_index.md +++ b/content/rke/v0.1.x/en/config-options/add-ons/network-plugins/_index.md @@ -4,31 +4,67 @@ weight: 251 draft: true --- -RKE supports the following network plugins that are deployed as add-ons: +RKE supports the following network plug-ins that are deployed as add-ons: - Flannel - Calico - Canal - Weave -To use a specific network plugin configure `cluster.yml` to include: +By default, the network plug-in is `canal`. If you want to use another network plug-in, you need to specify which network plug-in to enable at the cluster level in the `cluster.yml`. + +```yaml +# Setting the flannel network plug-in +network: + plugin: flannel +``` + +The images used for network plug-ins are under the [`system_images` directive]({< baseurl >}}/rke/v0.1.x/en/config-options/system-images/). For each Kubernetes version, there are default images associated with each network plug-in, but these can be overridden by changing the image tag in `system_images`. + +## Network Plug-in Options + +Besides the different images that could be used to deploy network plug-ins, certain network plug-ins support additional options that can be used to customize the network plug-in. + +### Canal Network Plug-in Options ```yaml network: - plugin: flannel + plugin: canal + options: + canal_iface: eth1 ``` -Additionally, some plugins support additional options that can be used to customize their behavior. -If this section is not specified in the cluster configration, the default network plugin will be used. The default is `canal`. +#### Canal Interface -### Network Options +By setting the `canal_iface`, you can configure the interface to use for inter-host communication. -There are extra options that can be specified for each network plugin: +### Flannel Network Plug-in Options -#### Flannel +```yaml +network: + plugin: flannel + options: + flannel_iface: eth1 +``` -- **flannel_iface**: Interface to use for inter-host communication +#### Flannel Interface -#### Calico +By setting the `flannel_iface`, you can configure the interface to use for inter-host communication. -- **calico_cloud_provider**: Cloud provider where Calico will operate, currently supported values are: `aws`, `gce` + +### Calico Network Plug-in Options + +```yaml +network: + plugin: calico + calico_cloud_provider: aws +``` + +#### Cloud Provider + +Calico currently only supports 2 cloud providers, AWS or GCE, which can be set using `calico_cloud_provider`. + +**Valid Options** + +- `aws` +- `gce` diff --git a/content/rke/v0.1.x/en/config-options/services/_index.md b/content/rke/v0.1.x/en/config-options/services/_index.md index 9f9109efeea..01bd78041a8 100644 --- a/content/rke/v0.1.x/en/config-options/services/_index.md +++ b/content/rke/v0.1.x/en/config-options/services/_index.md @@ -1,99 +1,97 @@ --- -title: Kubernetes Services +title: Kubernetes Default Services weight: 230 draft: true --- -## Default services +To deploy Kubernetes, RKE deploys several core components or services in Docker containers on the nodes. Based on the roles of the node, the containers deployed may be different. - +**All services support additional [custom arguments, Docker mount binds and extra environment variables]({{< baseurl >}}/rke/v0.1.x/en/config-options/services-extra).** -To deploy Kubernetes, RKE deploys several core components or services in Docker containers on the cluster nodes. The deployed containers depend on the role(s) assigned to each node. +## etcd -All RKE services support additional [custom arguments and Docker mount binds]({{< baseurl >}}/rke/v0.1.x/en/config-options/extra-args-and-binds). +Kubernetes uses [etcd](https://github.com/coreos/etcd/blob/master/Documentation/docs.md) as a store for cluster state and data. Etcd is a reliable, consistent and distributed key-value store. -Various examples and configurations can be found in the [example YMALs]({{< baseurl >}}/rke/v0.1.x/en/config-options/example-yamls/) +RKE supports running etcd in a single node mode or in HA cluster mode. It also supports adding and removing etcd nodes to the cluster. -### etcd +By default, RKE will deploy a new etcd service, but you can also run Kubernetes with an [external etcd service]({{< baseurl >}}/rke/v0.1.x/en/config-options/services/external-etcd/). -Kubernetes uses [Etcd](https://github.com/coreos/etcd/blob/master/Documentation/docs.md) as a store for cluster state and data. Etcd is a reliable, consistent and distributed key-value store. - -RKE supports running Etcd in a single node mode or in HA cluster mode. It also supports adding and removing Etcd nodes to the cluster. - -RKE also supports running Kubernetes with an [external Etcd service]({{< baseurl >}}/rke/v0.1.x/en/config-options/services/external-etcd/). - - -### kube-api +## Kubernetes API Server The [Kubernetes API](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/) REST service, which handles requests and data for all Kubernetes objects and provide shared state for all the other Kubernetes components. -In addition to extra arguments and binds, RKE supports the following options for kube-api: +```yaml +services: + kube-api: + # IP range for any services created on Kubernetes + service_cluster_ip_range: 10.43.0.0/16 + # Expose a different port range for NodePort services + service_node_port_range: 30000-32767 + pod_security_policy: false +``` -##### `service_cluster_ip_range` +### Kubernetes API Server Options -This is the virtual IP address that will be assigned to services created on Kubernetes. The default value for this option is `10.43.0.0/16`. +RKE supports the following options for the `kube-api` service : +- **Service Cluster IP Range** (`service_cluster_ip_range`) - This is the virtual IP address that will be assigned to services created on Kubernetes. By default, the service cluster IP range is `10.43.0.0/16`. If you change this value, then it must also be set with the same value on the Kubernetes Controller Manager (`kube-controller`). +- **Node Port Range** (`service_node_port_range`) - The port range to be used for Kubernetes services created with the [type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) `NodePort`. By default, the port range is `30000-32767`. +- **Pod Security Policy** (`pod_security_policy`) - An option to enable the [Kubernetes Pod Security Policy](https://kubernetes.io/docs/concepts/policy/pod-security-policy/). By default, we do not enable pod security policies as it is set to `false`. -##### `service_node_port_range` -The port range to be used for Kubernetes services created with the [type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) `NodePort`. + > **Note:** If you set `pod_security_policy` value to `true`, RKE will configure an open policy to allow any pods to work on the cluster. You will need to configure your own policies to fully utilize PSP. -The default value for this option is `30000-32767`. +## Kubernetes Controller Manager -##### `pod_security_policy` + kube-controller -An option to enable the [Kubernetes Pod Security Policy](https://kubernetes.io/docs/concepts/policy/pod-security-policy/). +The [Kubernetes Controller Manager](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/) service is the component responsible for running Kubernetes main control loops. The controller manager monitors the cluster desired state through the Kubernetes API server and makes the necessary changes to the current state to reach the desired state. -The default value for this option is `false`, which disables PSP. +```yaml +services: + kube-controller: + # CIDR pool used to assign IP addresses to pods in the cluster + cluster_cidr: 10.42.0.0/16 + # + service_cluster_ip_range: 10.43.0.0/16 +``` -> **Note**: RKE will configure an initially open policy to allow pods to work on the cluster. You will need to configure your own policies to fully utilize PSP. +### Kubernetes Controller Manager Options +RKE support the following options for the `kube-controller` service: -### `kube-controller` +- **Cluster CIDR** (`cluster_cidr`) - The CIDR pool used to assign IP addresses to pods in the cluster. By default, each node in the cluster is assigned a `/24` network from this pool for pod IP assignments. The default value for this option is `10.42.0.0/16`. +- **Service Cluster IP Range** (`service_cluster_ip_range`) - This is the virtual IP address that will be assigned to services created on Kubernetes. By default, the service cluster IP range is `10.43.0.0/16`. If you change this value, then it must also be set with the same value on the Kubernetes API server (`kube-api`). -The [Kubernetes Controller Manager](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/) service. This is the component responsible for running Kubernetes main control loops. The controller manager monitors the cluster desired state through the kube-apiserver and make the necessary changes to the current state to reach the desired state. +## Kubelet -RKE support the following options for the controller service: +The [kubelet](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/) services acts as a "node agent" for Kubernetes. It runs on all nodes deployed by RKE, and gives Kubernetes the ability to manage the container runtime on the node. -##### `cluster_cidr` -The CIDR pool used to assign IP addresses to Pods in the cluster. By default, each node in the cluster is assigned a /24 network from this pool for Pod IP assignment on this node. +```yaml +services: + kubelet: + # Base domain for the cluster + cluster_domain: cluster.local + # IP address for the DNS service endpoint + cluster_dns_server: 10.43.0.10 + # Fail if swap is on + fail_swap_on: false +``` -The default value for this option is `10.42.0.0/16`. - -##### `service_cluster_ip_range` - -This is the virtual IP address that will be assigned to services created on Kubernetes. The default value for this option is `10.43.0.0/16`. - - -### `scheduler` - -The [Kubernetes Scheduler](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/) service. The Kubernetes Scheduler is responsible for scheduling cluster workloads based on various configurations, metrics, resource requirements and workload-specific requirements. - -RKE doesn't support any specific options for the scheduler service at this time. - - -### `kubelet` - -The [Kubelet](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/) services acts as a "node agent" for Kubernetes. It runs on all nodes deployed by RKE, and gives Kubernetes the ability to manage the container runime one the node. +### Kubelet Options RKE supports the following options for the `kubelet` service: -##### cluster_domain +- **Cluster Domain** (`cluster_domain`) - The [base domain](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/) for the cluster. All services and DNS records created on the cluster. By default, the domain is set to `cluster.local`. +- **Cluster DNS Server** (`cluster_dns_server`) - The IP address assigned to the DNS service endpoint within the cluster. DNS queries will be sent to this IP address which is used by KubeDNS. The default value for this option is `10.43.0.10` +- **Fail if Swap is On** (`fail_swap_on`) - In Kubernetes, the default behavior for the kubelet is to **fail** if swap is enabled on the node. RKE does **not** follow this default and allows deployments on nodes with swap enabled. By default, the value is `false`. If you'd like to revert to the default kubelet behavior, set this option to `true`. -The [base domain](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/) for the cluster. All services and DNS records created on the cluster. The default value for this option is `cluster.local` +## Kubernetes Scheduler -##### `cluster_dns_server` +The [Kubernetes Scheduler](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/) service is responsible for scheduling cluster workloads based on various configurations, metrics, resource requirements and workload-specific requirements. -The IP address assigned to the DNS service endpoint within the cluster. DNS queries will be sent to this IP address which is used by KubeDNS. The default value for this option is `10.43.0.10` +Currently, RKE doesn't support any specific options for the `scheduler` service. +## Kubernetes Network Proxy +The [Kubernetes network proxy](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/) service runs on all nodes and manages endpoints created by Kubernetes for TCP/UDP ports. -##### `fail_swap_on` - -The default behavior for Kubelet is to _fail_ if swap is enabled on the node. However, RKE doesn't follow this default, and allows deployments on nodes with swap enabled. If you like to revert to the default Kubelet behavior, set this option to `true`. - -The defualt for this option is `false`. - - -### `kube-proxy` -The [Kubernetes Network Proxy](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/) service runs on all nodes and manages endpoints created by Kubernetes for TCP/UDP ports. - -RKE doesn't support any specific options for the `kube-proxy` service at this time. +Currently, RKE doesn't support any specific options for the `kube-proxy` service. diff --git a/content/rke/v0.1.x/en/config-options/system-images/_index.md b/content/rke/v0.1.x/en/config-options/system-images/_index.md index 039ad791ffe..e26261fa7b7 100644 --- a/content/rke/v0.1.x/en/config-options/system-images/_index.md +++ b/content/rke/v0.1.x/en/config-options/system-images/_index.md @@ -7,6 +7,8 @@ When RKE is deploying Kubernetes, there are several images that are pulled. Thes As of `v0.1.6`, the functionality of a couple of the system images were consolidated into a single `rancher/rke-tools` image to simplify and speed the deployment process. +You can configure the [network plug-ins]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/network-plugins/) and [ingress controller]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/ingress-controllers/) as well as the options for these add-ons separately. + This is the example of the full list of system images used to deploy Kubernetes through RKE. The image tags are dependent on the [Kubernetes image/version used](https://github.com/rancher/types/blob/master/apis/management.cattle.io/v3/k8s_defaults.go). > **Note:** As versions of RKE are released, the tags on these images will no longer be up to date. This list is specific for `v1.10.3-rancher2`. @@ -25,15 +27,21 @@ system_images: kubedns_autoscaler: rancher/cluster-proportional-autoscaler-amd64:1.0.0 pod_infra_container: rancher/pause-amd64:3.1 - # Networking Options + # Flannel Networking Options flannel: rancher/coreos-flannel:v0.9.1 flannel_cni: rancher/coreos-flannel-cni:v0.2.0 + + # Calico Networking Options calico_node: rancher/calico-node:v3.1.1 calico_cni: rancher/calico-cni:v3.1.1 calico_ctl: rancher/calico-ctl:v2.0.0 + + # Canal Networking Options canal_node: rancher/calico-node:v3.1.1 canal_cni: rancher/calico-cni:v3.1.1 canal_flannel: rancher/coreos-flannel:v0.9.1 + + # Weave Networking Options weave_node: weaveworks/weave-kube:2.1.2 weave_cni: weaveworks/weave-npc:2.1.2 diff --git a/content/rke/v0.1.x/en/installation/etcd-snapshots/_index.md b/content/rke/v0.1.x/en/installation/etcd-snapshots/_index.md index bc107edff9b..8b30425409f 100644 --- a/content/rke/v0.1.x/en/installation/etcd-snapshots/_index.md +++ b/content/rke/v0.1.x/en/installation/etcd-snapshots/_index.md @@ -4,7 +4,7 @@ weight: 65 draft: true --- -You can configure a RKE cluster to automatically take snapshots of etcd. In a disaster scenario, you can restore these snapshots, which are stored on other nodes in the cluster. +As of v0.1.7, you can configure a RKE cluster to automatically take snapshots of etcd. In a disaster scenario, you can restore these snapshots, which are stored on other nodes in the cluster. ## One-Time Snapshots