Edit Rancher-on-K3s install docs

This commit is contained in:
Catherine Luse
2020-03-30 13:33:04 -07:00
parent fc2201f34f
commit 1e475baaa4
8 changed files with 41 additions and 12 deletions
+2 -2
View File
@@ -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?
+4 -1
View File
@@ -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]({{<baseurl>}}/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]({{<baseurl>}}/rancher/v2.x/en/cluster-admin/backing-up-etcd/)
@@ -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]({{<baseurl>}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/), please refer [here]({{<baseurl>}}/rancher/v2.x/en/cluster-admin/backing-up-etcd/).
@@ -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/
@@ -0,0 +1,4 @@
---
title: Backing up Rancher Installed on a K3s Kubernetes Cluster
weight: 1
---
@@ -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/
---
@@ -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.