From 1e475baaa4179d8517b5c8a0966b6618b7046132 Mon Sep 17 00:00:00 2001 From: Catherine Luse Date: Thu, 20 Feb 2020 18:19:55 -0700 Subject: [PATCH] Edit Rancher-on-K3s install docs --- content/k3s/latest/en/_index.md | 4 +-- content/rancher/v2.x/en/backups/_index.md | 5 +++- .../rancher/v2.x/en/backups/backups/_index.md | 5 ++-- .../en/backups/backups/ha-backups/_index.md | 4 +-- .../en/backups/backups/k3s-backups/_index.md | 4 +++ .../backups/single-node-backups/_index.md | 4 +-- .../restorations/k3s-restoration/_index.md | 0 .../k8s-install/kubernetes-rke/_index.md | 27 ++++++++++++++++--- 8 files changed, 41 insertions(+), 12 deletions(-) create mode 100644 content/rancher/v2.x/en/backups/backups/k3s-backups/_index.md create mode 100644 content/rancher/v2.x/en/backups/restorations/k3s-restoration/_index.md diff --git a/content/k3s/latest/en/_index.md b/content/k3s/latest/en/_index.md index 2b47eee622b..952027f0c93 100644 --- a/content/k3s/latest/en/_index.md +++ b/content/k3s/latest/en/_index.md @@ -4,7 +4,7 @@ shortTitle: K3s name: "menu" --- -Lightweight Kubernetes. Easy to install, half the memory, all in a binary of less than 50mb. +Lightweight Kubernetes. Easy to install, half the memory, all in a binary of less than 50mb. Great for: @@ -12,7 +12,7 @@ Great for: * IoT * CI * ARM -* Situations where a PhD in k8s clusterology is infeasible +* Situations where a PhD in K8s clusterology is infeasible # What is K3s? diff --git a/content/rancher/v2.x/en/backups/_index.md b/content/rancher/v2.x/en/backups/_index.md index d51850c3fe9..e88b97fbbd3 100644 --- a/content/rancher/v2.x/en/backups/_index.md +++ b/content/rancher/v2.x/en/backups/_index.md @@ -8,7 +8,10 @@ This section is devoted to protecting your data in a disaster scenario. To protect yourself from a disaster scenario, you should create backups on a regular basis. - - [Rancher Server Backups]({{}}/rancher/v2.x/en/backups/backups) + - Rancher server backups: + - [Rancher installed on a K3s Kubernetes cluster](./backups/k3s-backups) + - [Rancher installed on an RKE Kubernetes cluster](./backups/ha-backups) + - Rancher installed with Docker - [Backing up Rancher Launched Kubernetes Clusters]({{}}/rancher/v2.x/en/cluster-admin/backing-up-etcd/) diff --git a/content/rancher/v2.x/en/backups/backups/_index.md b/content/rancher/v2.x/en/backups/backups/_index.md index 57e2150b516..072c1913cac 100644 --- a/content/rancher/v2.x/en/backups/backups/_index.md +++ b/content/rancher/v2.x/en/backups/backups/_index.md @@ -7,7 +7,8 @@ aliases: --- This section contains information about how to create backups of your Rancher data and how to restore them in a disaster scenario. -- [Docker Install Backups](./single-node-backups/) -- [Kubernetes Install Backups](./ha-backups/) +- [Backing up Rancher installed on a K3s Kubernetes cluster](./k3s-backups) +- [Backing up Rancher installed on an RKE Kubernetes cluster](./ha-backups/) +- [Backing up Rancher installed with Docker](./single-node-backups/) If you are looking to back up your [Rancher launched Kubernetes cluster]({{}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/), please refer [here]({{}}/rancher/v2.x/en/cluster-admin/backing-up-etcd/). diff --git a/content/rancher/v2.x/en/backups/backups/ha-backups/_index.md b/content/rancher/v2.x/en/backups/backups/ha-backups/_index.md index 08fce60c0b2..acbd2aab431 100644 --- a/content/rancher/v2.x/en/backups/backups/ha-backups/_index.md +++ b/content/rancher/v2.x/en/backups/backups/ha-backups/_index.md @@ -1,6 +1,6 @@ --- -title: Creating Backups for Rancher Installed on Kubernetes -weight: 50 +title: Backing up Rancher Installed on an RKE Kubernetes Cluster +weight: 2 aliases: - /rancher/v2.x/en/installation/after-installation/k8s-install-backup-and-restoration/ - /rancher/v2.x/en/installation/backups-and-restoration/ha-backup-and-restoration/ diff --git a/content/rancher/v2.x/en/backups/backups/k3s-backups/_index.md b/content/rancher/v2.x/en/backups/backups/k3s-backups/_index.md new file mode 100644 index 00000000000..f96f3466a43 --- /dev/null +++ b/content/rancher/v2.x/en/backups/backups/k3s-backups/_index.md @@ -0,0 +1,4 @@ +--- +title: Backing up Rancher Installed on a K3s Kubernetes Cluster +weight: 1 +--- \ No newline at end of file diff --git a/content/rancher/v2.x/en/backups/backups/single-node-backups/_index.md b/content/rancher/v2.x/en/backups/backups/single-node-backups/_index.md index bd2cb04d8d5..ae0ee7b1ae7 100644 --- a/content/rancher/v2.x/en/backups/backups/single-node-backups/_index.md +++ b/content/rancher/v2.x/en/backups/backups/single-node-backups/_index.md @@ -1,6 +1,6 @@ --- -title: Creating Backups for Rancher Installed with Docker -weight: 25 +title: Backing up Rancher Installed with Docker +weight: 3 aliases: - /rancher/v2.x/en/installation/after-installation/single-node-backup-and-restoration/ --- diff --git a/content/rancher/v2.x/en/backups/restorations/k3s-restoration/_index.md b/content/rancher/v2.x/en/backups/restorations/k3s-restoration/_index.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/content/rancher/v2.x/en/installation/k8s-install/kubernetes-rke/_index.md b/content/rancher/v2.x/en/installation/k8s-install/kubernetes-rke/_index.md index 5a6ef54e701..52f27af109e 100644 --- a/content/rancher/v2.x/en/installation/k8s-install/kubernetes-rke/_index.md +++ b/content/rancher/v2.x/en/installation/k8s-install/kubernetes-rke/_index.md @@ -41,8 +41,7 @@ When running the command to start the K3s Kubernetes API server, you will pass i 1. On the Linux node, run this command to start the K3s server and connect it to the external datastore: ``` curl -sfL https://get.k3s.io | sh -s - server \ - --datastore-endpoint="mysql://username:password@tcp(hostname:3306)/database-name" \ - --no-deploy=traefik + --datastore-endpoint="mysql://username:password@tcp(hostname:3306)/database-name" ``` Note: The datastore endpoint can also be passed in using the environment variable `$K3S_DATASTORE_ENDPOINT`. @@ -78,7 +77,29 @@ To use this `kubeconfig` file, 1. Install [kubectl,](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl) a Kubernetes command-line tool. 2. Copy the file at `/etc/rancher/k3s/k3s.yaml` and save it to the directory `~/.kube/config` on your local machine. -3. Replace `localhost` in the kubeconfig file with the IP or name of your K3s server. +3. In the kubeconfig file, the `server` directive is defined as localhost. Configure the server as the DNS of your load balancer, referring to port 6443. (The Kubernetes API server will be reached at port 6443, while the Rancher server will be reached at ports 80 and 443.) Here is an example `k3s.yaml`: + +``` +apiVersion: v1 +clusters: +- cluster: + certificate-authority-data: [CERTIFICATE-DATA] + server: [LOAD-BALANCER-DNS]:6443 # Edit this line + name: default +contexts: +- context: + cluster: default + user: default + name: default +current-context: default +kind: Config +preferences: {} +users: +- name: default + user: + password: [PASSWORD] + username: admin +``` **Result:** You can now use `kubectl` to manage your K3s cluster.