{{ .Content }} - + {{ $paginator := .Scratch.Get "paginator" }} {{ range $paginator.Pages }}

{{.Title}}

- + {{ if .Params.Image }}
{{ .Params.Title }}
{{end}} - +

{{ .Summary | safeHTML }}

{{ if .Truncated }}
@@ -95,38 +94,38 @@
- + {{ with .Params.Author }}
person_outline By: {{ . }}
{{end}} - + {{ if eq .Section "events" }} {{ with .Params.EventDate }}
event {{ . }}
{{end}} - + {{ else }} - + {{ with .Params.Date }}
event {{ .Format "January 2, 2006" }}
{{end}} {{end}} - + {{ if eq .Section "blog" }}
timer Read Time: {{.ReadingTime}} minutes
{{end}} - + {{ with .Params.Location }}
location_on {{ . }}
{{end}} - +
{{ end }}
{{ template "_internal/pagination.html" . }} - +
{{ partial "page-edit.html" . }}
-
+
-{{ if .Title }} -{{.Title}} -{{ else }} -Quick Start Guide -{{end}} + {{ if .Title }} + {{.Title}} + {{ else }} + (No Title) + {{end}} @@ -60,36 +63,72 @@ Quick Start Guide
-
+
    - {{ template "section-tree-nav" ($.Scratch.Get "topLevel") }} - -
  • - - Back to the top - - - - - - - - -
  • + {{ $activeNode := . }} + {{ range ($.Scratch.Get "topLevel").Sections }} + {{ template "menu" dict "node" . "activeNode" $activeNode }} + {{ end }}
-{{ define "section-tree-nav" }} - {{ range .Sections}} -
  • {{ .Title }} - {{if gt (len .Sections) 0}} - - {{end}} -
  • +{{ define "menu" }} + {{/* .node and .activeNode come from the caller */}} + {{- $activeNode := .activeNode -}} + {{- with .node -}} + {{- $isActive := "" -}} + {{- if eq .UniqueID $activeNode.UniqueID -}} + {{- $isActive = "active" -}} + {{- end -}} + + {{- $isOpen := false -}} + {{- if (or .Params.alwaysOpen (.IsAncestor $activeNode)) -}} + {{- $isOpen = true -}} + {{- end -}} + + {{- if .IsSection -}} + {{- $children := (add (len .Pages) (len .Sections)) -}} +
  • + + {{- if .Params.shortTitle -}} + {{ .Params.shortTitle}} + {{- else -}} + {{ .Title }} + {{- end -}} + {{- if gt $children 0 -}} + + + + + + {{- end -}} + + {{if gt $children 0}} + + {{- end -}} +
  • + {{- else if not .Params.hidden -}} +
  • + + {{- if .Params.shortTitle -}} + {{ .Params.shortTitle}} + {{- else -}} + {{ .Title }} + {{- end -}} + +
  • + {{- end -}} {{ end }} {{ end }} diff --git a/layouts/partials/page-nav.html b/layouts/partials/page-nav.html index 566e9c70b..0891b848c 100644 --- a/layouts/partials/page-nav.html +++ b/layouts/partials/page-nav.html @@ -7,7 +7,6 @@ {{ range .Sections}}
  • {{ .Title }} {{if gt (len .Sections) 0}} -
      {{ range .Pages }}
    • {{ .Title }}
    • diff --git a/package.json b/package.json index d00a476da..d77551d3f 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "jsdom": "^11.11.0", "lory.js": "^2.4.1", "md5": "^2.2.1", - "ml-stack-nav": "^1.1.2", "moment": "^2.20.1", "rancher-website-theme": "https://github.com/rancherlabs/website-theme.git", "request": "^2.87.0", From 4e1b0706426956f3ef3ef5397866b16f9d487c7d Mon Sep 17 00:00:00 2001 From: niusmallnan Date: Fri, 10 May 2019 14:43:54 +0800 Subject: [PATCH 30/78] Update doc for running rancheros on DO --- .../running-rancheros/cloud/do/_index.md | 63 ++++++++----------- 1 file changed, 25 insertions(+), 38 deletions(-) diff --git a/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md b/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md index dc18cd01c..d06c09444 100644 --- a/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md +++ b/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md @@ -3,46 +3,33 @@ title: Digital Ocean weight: 107 --- -Running RancherOS on DigitalOcean is not yet supported, but there is a `rancheros` image now available from the commandline tools, so you can run: +Now RancherOS is avaliable in DO portal. RancherOS is a member of container distributions and you can find it easily. + +You can access the host via SSH after booted, the default user is `rancher`. + +You can do some initialization with user data, such as deploying Rancher. Here are the rough user data: ``` -$ doctl.exe compute droplet create --image rancheros --region sfo1 --size 2gb --ssh-keys 0a:db:77:92:03:b5:b2:94:96:d0:92:6a:e1:da:cd:28 myrancherosvm -ID Name Public IPv4 Private IPv4 Public IPv6 Memory VCPUs Disk Region Image Status Tags -47145723 myrancherosvm 2048 2 40 sfo1 RacherOS v1.0.1-rc [UNSUPPORTED/BETA] new +#cloud-config -$ doctl.exe compute droplet list -47145723 myrancherosvm 107.170.203.111 10.134.26.83 2604:A880:0001:0020:0000:0000:2750:0001 2048 2 40 sfo1 RacherOS v1.0.1-rc [UNSUPPORTED/BETA] active +write_files: + - path: /etc/rc.local + permissions: "0755" + owner: root + content: | + #!/bin/bash + wait-for-docker -ssh -i ~/.ssh/Sven.pem rancher@107.170.203.111 -``` - -or use `docker-machine`: - -``` -$ docker-machine create -d digitalocean --digitalocean-access-token --digitalocean-image rancheros --digitalocean-region sfo1 --digitalocean-size 2gb --digitalocean-ssh-user rancher sven-machine -Running pre-create checks... -Creating machine... -(sven-machine) Creating SSH key... -(sven-machine) Assuming Digital Ocean private SSH is located at ~/.ssh/id_rsa -(sven-machine) Creating Digital Ocean droplet... -(sven-machine) Waiting for IP address to be assigned to the Droplet... -Waiting for machine to be running, this may take a few minutes... -Detecting operating system of created instance... -Waiting for SSH to be available... -Detecting the provisioner... -Provisioning with rancheros... -Copying certs to the local machine directory... -Copying certs to the remote machine... -Setting Docker configuration on the remote daemon... -Checking connection to Docker... -Docker is up and running! -To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: C:\Users\svend\src\github.com\docker\machine\machine.exe env sven-machine -$ docker-machine ls -NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS -rancheros-100 - virtualbox Stopped Unknown -sven-machine - digitalocean Running tcp://104.131.156.5:2376 v17.03.1-ce -$ docker-machine ssh sven-machine -Enter passphrase for key '/c/Users/svend/.ssh/id_rsa': -[rancher@sven-machine ~]$ -[rancher@sven-machine ~]$ + export curlimage=appropriate/curl + export jqimage=stedolan/jq + export rancher_version=v2.2.2 + + for image in $curlimage $jqimage "rancher/rancher:${rancher_version}"; do + until docker inspect $image > /dev/null 2>&1; do + docker pull $image + sleep 2 + done + done + + docker run -d --restart=unless-stopped -p 80:80 -p 443:443 -v /opt/rancher:/var/lib/rancher rancher/rancher:${rancher_version} ``` From a677305090820fbce97d8b5af22fd8adf7c75106 Mon Sep 17 00:00:00 2001 From: Erik Wilson Date: Tue, 25 Jun 2019 08:48:59 -0700 Subject: [PATCH 31/78] Cleanup k3s docs --- content/k3s/latest/en/configuration/_index.md | 47 +++++++------------ content/k3s/latest/en/installation/_index.md | 45 +++++++++++------- content/k3s/latest/en/running/_index.md | 15 +++--- 3 files changed, 54 insertions(+), 53 deletions(-) diff --git a/content/k3s/latest/en/configuration/_index.md b/content/k3s/latest/en/configuration/_index.md index ab9f1a073..0135e5e41 100644 --- a/content/k3s/latest/en/configuration/_index.md +++ b/content/k3s/latest/en/configuration/_index.md @@ -79,9 +79,7 @@ Containerd and Docker k3s includes and defaults to containerd. Why? Because it's just plain better. If you want to run with Docker first stop and think, "Really? Do I really want more headache?" If still -yes then you just need to run the agent with the `--docker` flag - - k3s agent -s ${SERVER_URL} -t ${NODE_TOKEN} --docker & +yes then you just need to run the agent with the `--docker` flag. k3s will generate config.toml for containerd in `/var/lib/rancher/k3s/agent/etc/containerd/config.toml`, for advanced customization for this file you can create another file called `config.toml.tmpl` in the same directory and it will be used instead. @@ -132,9 +130,8 @@ mount namespace. Node Labels and Taints ---------------------- -k3s server and agent can be configured with options `--node-label` and `--node-taint` which adds set of Labels and Taints to kubelet, the two options only adds labels/taints at registration time, so they can only be added once and not changed after that, an example to add new label is: +k3s agents can be configured with options `--node-label` and `--node-taint` which adds set of Labels and Taints to kubelet, the two options only adds labels/taints at registration time, so they can only be added once and not changed after that, an example of options to add new label is: ``` -k3s server \ --node-label foo=bar \ --node-label hello=world \ --node-taint key1=value1:NoExecute @@ -143,27 +140,21 @@ k3s server \ Flannel ------- -Flannel is included by default, if you don't want flannel then run the agent with `--no-flannel` as follows - - k3s agent -u ${SERVER_URL} -t ${NODE_TOKEN} --no-flannel & +Flannel is included by default, if you don't want flannel then run the agent with `--no-flannel` option. In this setup you will still be required to install your own CNI driver. More info [here](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#pod-network) CoreDNS ------- -CoreDNS is deployed on start of the agent, to disable add `--no-deploy coredns` to the server - - k3s server --no-deploy coredns +CoreDNS is deployed on start of the agent, to disable run the server with the `--no-deploy coredns` option. If you don't install CoreDNS you will need to install a cluster DNS provider yourself. Traefik ------- -Traefik is deployed by default when starting the server; to disable it, start the server with `--no-deploy traefik` like this - - k3s server --no-deploy traefik +Traefik is deployed by default when starting the server; to disable it, start the server with the `--no-deploy traefik` option. Service Load Balancer --------------------- @@ -172,16 +163,15 @@ k3s includes a basic service load balancer that uses available host ports. If y a load balancer that listens on port 80, for example, it will try to find a free host in the cluster for port 80. If no port is available the load balancer will stay in Pending. -To disable the embedded service load balancer (if you wish to use a different implementation like -MetalLB) just add `--no-deploy=servicelb` to the server on startup. +To disable the embedded load balancer run the server with the `--no-deploy servicelb` option. This is necessary if you wish to run a different load balancer, such as MetalLB. Metrics Server -------------- -To add functionality for commands such as `k3s kubectl top node` metrics-server must be installed, +To add functionality for commands such as `k3s kubectl top nodes` metrics-server must be installed, to install see the instructions located at https://github.com/kubernetes-incubator/metrics-server/. -NOTE: By default the image used in `metrics-server-deployment.yaml` is valid only for amd64 devices, +**NOTE** : By default the image used in `metrics-server-deployment.yaml` is valid only for **amd64** devices, this should be edited as appropriate for your architecture. As of this writing metrics-server provides the following images relevant to k3s: `amd64:v0.3.3`, `arm64:v0.3.2`, and `arm:v0.3.2`. Further information on the images provided through gcr.io can be found at https://console.cloud.google.com/gcr/images/google-containers/GLOBAL. @@ -189,7 +179,7 @@ on the images provided through gcr.io can be found at https://console.cloud.goog Storage Backends ---------------- -As of version 0.6.0, k3s can support various storage backends including: SQLite (default), MySQL, Postgres, and etcd, this enahancement depends on the following arguments that can be passed to k3s server: +As of version 0.6.0, k3s can support various storage backends including: SQLite (default), MySQL, Postgres, and etcd, this enhancement depends on the following arguments that can be passed to k3s server: * `--storage-backend` _value_ @@ -216,14 +206,13 @@ As of version 0.6.0, k3s can support various storage backends including: SQLite To use k3s with MySQL storage backend, you can specify the following for insecure connection: ``` -k3s server --storage-endpoint="mysql://" + --storage-endpoint="mysql://" ``` By default the server will attempt to connect to mysql using the mysql socket at `/var/run/mysqld/mysqld.sock` using the root user and with no password, k3s will also create a database with the name `kubernetes` if the database is not specified in the DSN. To override the method of connection, user/pass, and database name, you can provide a custom DSN, for example: ``` -k3s server \ --storage-endpoint="mysql://k3suser:k3spass@tcp(192.168.1.100:3306)/k3stest" ``` @@ -231,7 +220,6 @@ This command will attempt to connect to MySQL on host `192.168.1.100` on port `3 To connect to MySQL securely, you can use the following example: ``` -k3s server \ --storage-endpoint="mysql://k3suser:k3spass@tcp(192.168.1.100:3306)/k3stest" \ --storage-cafile ca.crt \ --storage-certfile mysql.crt \ @@ -245,7 +233,7 @@ The above command will use these certificates to generate the tls config to comm Connection to postgres can be established using the following command: ``` -k3s server --storage-endpoint="postgres://" + --storage-endpoint="postgres://" ``` By default the server will attempt to connect to postgres on localhost with using the `postgres` user and with `postgres` password, k3s will also create a database with the name `kubernetes` if the database is not specified in the DSN. @@ -253,7 +241,6 @@ By default the server will attempt to connect to postgres on localhost with usin To override the method of connection, user/pass, and database name, you can provide a custom DSN, for example: ``` -k3s server \ --storage-endpoint="postgres://k3suser:k3spass@192.168.1.100:5432/k3stest" ``` @@ -262,30 +249,30 @@ This command will attempt to connect to Postgres on host `192.168.1.100` on port To connect to Postgres securely, you can use the following example: ``` -k3s server \ - --storage-endpoint="postgres://k3suser:k3spass@192.168.1.100:5432/k3stest?sslmode=verify-full" \ + --storage-endpoint="postgres://k3suser:k3spass@192.168.1.100:5432/k3stest" \ --storage-certfile postgres.crt \ --storage-keyfile postgres.key \ --storage-cafile ca.crt ``` -The above command will use these certificates to generate the tls config to communicate with postgres securely, note that the `sslmode` in the example is `verify-full` which verify that the certification presented by the server was signed by a trusted CA and the server host name matches the one in the certificate. +The above command will use these certificates to generate the tls config to communicate with postgres securely. ### etcd Connection to etcd3 can be established using the following command: ``` -k3s server --storage-backend=etcd3 \ + --storage-backend=etcd3 \ --storage-endpoint="https://127.0.0.1:2379" ``` The above command will attempt to connect insecurely to etcd on localhost with port `2379`, you can connect securely to etcd using the following command: ``` -k3s server \ --storage-backend=etcd3 \ --storage-endpoint="https://127.0.0.1:2379" \ --storage-cafile ca.crt \ --storage-certfile etcd.crt \ --storage-keyfile etcd.key -``` \ No newline at end of file +``` + +The above command will use these certificates to generate the tls config to communicate with etcd securely. diff --git a/content/k3s/latest/en/installation/_index.md b/content/k3s/latest/en/installation/_index.md index cb7659e9a..980deee37 100644 --- a/content/k3s/latest/en/installation/_index.md +++ b/content/k3s/latest/en/installation/_index.md @@ -86,7 +86,10 @@ The full help text for the install script environment variables are as follows: if not specified. Server Options ------------------- +-------------- + +The following information on server options is also available through `k3s server --help` : + * `--bind-address` _value_ k3s bind address (default: localhost) @@ -234,6 +237,8 @@ Server Options Agent Options ------------------ +The following information on agent options is also available through `k3s agent --help` : + * `--token` _value_, `-t` _value_ Token to use for authentication [$`K3S_TOKEN`] @@ -311,21 +316,29 @@ Customizing components As of v0.3.0 any of the following processes can be customized with extra flags: -- [kube-apiserver](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/) (server) -- [kube-controller-manager](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/) (server) -- [kube-scheduler](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/) (server) -- [kubelet](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/) (agent) -- [kube-proxy](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/) (agent) +* `--kube-apiserver-arg` _value_ + + (server) [kube-apiserver options](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/) + +* `--kube-controller-arg` _value_ + + (server) [kube-controller-manager options](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/) + +* `--kube-scheduler-arg` _value_ + + (server) [kube-scheduler options](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/) + +* `--kubelet-arg` _value_ + + (agent) [kubelet options](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/) + +* `--kube-proxy-arg` _value_ + + (agent) [kube-proxy options](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/) + +Adding extra arguments can be done by passing the following flags to server or agent. +For example to add the following arguments `-v=9` and `log-file=/tmp/kubeapi.log` to the kube-apiserver, you should add the following options to k3s server: -Adding extra argument can be done by passing the following flags to server or agent: ``` ---kube-apiserver-arg value ---kube-scheduler-arg value ---kube-controller-arg value ---kubelet-arg value ---kube-proxy-arg value -``` -For example to add the following arguments `-v=9` and `log-file=/tmp/kubeapi.log` to the kube-apiserver, you should pass the following: -``` -k3s server --kube-apiserver-arg v=9 --kube-apiserver-arg log-file=/tmp/kubeapi.log +--kube-apiserver-arg v=9 --kube-apiserver-arg log-file=/tmp/kubeapi.log ``` diff --git a/content/k3s/latest/en/running/_index.md b/content/k3s/latest/en/running/_index.md index 1ed1655dc..4810494f1 100644 --- a/content/k3s/latest/en/running/_index.md +++ b/content/k3s/latest/en/running/_index.md @@ -8,7 +8,7 @@ This section contains information for running k3s in various environments. Starting the Server ------------------ -The installation script will auto-detect if your OS is using systemd or openrc. +The installation script will auto-detect if your OS is using systemd or openrc and start the service. When running with openrc logs will be created at `/var/log/k3s.log`, or with systemd in `/var/log/syslog` and viewed using `journalctl -u k3s`. When running the server manually you should get an output similar to: @@ -39,15 +39,16 @@ Joining Nodes ------------- When the server starts it creates a file `/var/lib/rancher/k3s/server/node-token`. -Use the contents of that file as `NODE_TOKEN` and then running the agent manually: - - k3s agent --server https://myserver:6443 --token ${NODE_TOKEN} - -Or as a `K3S_TOKEN` environment variable using the install script: +Using the contents of that file as `K3S_TOKEN` and setting `K3S_URL` allows the node +to join as an agent using the install script: curl -sfL https://get.k3s.io | K3S_URL=https://myserver:6443 K3S_TOKEN=XXX sh - -When running with openrc logs will be created at `/var/log/k3s-agent.log`, or with systemd in `/var/log/syslog` and viewed using `journalctl -u k3s-agent`. +When using the install script openrc logs will be created at `/var/log/k3s-agent.log`, or with systemd in `/var/log/syslog` and viewed using `journalctl -u k3s-agent`. + +Or running k3s manually with the token as `NODE_TOKEN`: + + k3s agent --server https://myserver:6443 --token ${NODE_TOKEN} SystemD ------- From 167b53699e4a91589f09524b4da0fb33038032cc Mon Sep 17 00:00:00 2001 From: Vincent Fiduccia Date: Tue, 25 Jun 2019 10:55:36 -0700 Subject: [PATCH 32/78] Title or short title --- layouts/partials/docs-side-nav.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/partials/docs-side-nav.html b/layouts/partials/docs-side-nav.html index 2e24d5e5a..29857608a 100644 --- a/layouts/partials/docs-side-nav.html +++ b/layouts/partials/docs-side-nav.html @@ -53,6 +53,8 @@
      {{ if .Title }} {{.Title}} + {{ else if .Params.shortTitle }} + {{.Params.shortTitle}} {{ else }} (No Title) {{end}} From 9bb8679c56221ead6ce84c945d13af6f453a1834 Mon Sep 17 00:00:00 2001 From: Catherine Luse Date: Tue, 25 Jun 2019 11:42:36 -0700 Subject: [PATCH 33/78] Add detail to doc about RancherOS on Digital Ocean --- .../running-rancheros/cloud/do/_index.md | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md b/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md index d06c09444..183e1fd6b 100644 --- a/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md +++ b/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md @@ -3,11 +3,25 @@ title: Digital Ocean weight: 107 --- -Now RancherOS is avaliable in DO portal. RancherOS is a member of container distributions and you can find it easily. +RancherOS is avaliable in the Digital Ocean portal. RancherOS is a member of container distributions and you can find it easily. -You can access the host via SSH after booted, the default user is `rancher`. +To start a RancherOS droplet on Digital Ocean: -You can do some initialization with user data, such as deploying Rancher. Here are the rough user data: +1. In the Digital Ocean portal, go to the project view. +1. Click **New Droplet.** +1. Click **Create Droplet.** +1. Click the **Container distributions** tab. +1. Click **RancherOS.** +1. Choose any options for plan, backups, block storage, and datacenter region. +1. Optional: In the **Select additional options** section, you can check the **User data** box and enter a `cloud-config` file in the text box that appears. The `cloud-config` file is used to provide a script to be run on the first boot. An example is below. +1. Choose an SSH key that you have access to, or generate a new SSH key. +1. Choose your project. +1. Click Create. + + +You can access the host via SSH after the droplet is booted. The default user is `rancher`. + +Below is an example `cloud-config` file that you can use to initialize the droplet with user data, such as deploying Rancher: ``` #cloud-config From dc47e53946112666b953332c5f77a388aa2de100 Mon Sep 17 00:00:00 2001 From: Catherine Luse Date: Tue, 25 Jun 2019 12:08:49 -0700 Subject: [PATCH 34/78] Minor edit to RancherOS Digital Ocean doc --- .../v1.x/en/installation/running-rancheros/cloud/do/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md b/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md index 183e1fd6b..3520ccf81 100644 --- a/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md +++ b/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md @@ -16,7 +16,7 @@ To start a RancherOS droplet on Digital Ocean: 1. Optional: In the **Select additional options** section, you can check the **User data** box and enter a `cloud-config` file in the text box that appears. The `cloud-config` file is used to provide a script to be run on the first boot. An example is below. 1. Choose an SSH key that you have access to, or generate a new SSH key. 1. Choose your project. -1. Click Create. +1. Click **Create.** You can access the host via SSH after the droplet is booted. The default user is `rancher`. From e0094d6f7a80bc34f2e5b3ecf65493d5de11e032 Mon Sep 17 00:00:00 2001 From: Catherine Luse Date: Tue, 25 Jun 2019 13:07:08 -0700 Subject: [PATCH 35/78] Add prerequisites to Digital Ocean RancherOS docs --- .../en/installation/running-rancheros/cloud/do/_index.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md b/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md index 3520ccf81..2ad00f644 100644 --- a/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md +++ b/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md @@ -5,6 +5,15 @@ weight: 107 RancherOS is avaliable in the Digital Ocean portal. RancherOS is a member of container distributions and you can find it easily. +## Prerequisites + +>**Note** +>Deploying to Digital Ocean will incur charges. + +Make sure your Digital Ocean droplet has the [minimum hardware requirements for RancherOS]({{< baseurl >}}os/v1.x/en/overview/#hardware-requirements). + +## Creating a Droplet with RancherOS + To start a RancherOS droplet on Digital Ocean: 1. In the Digital Ocean portal, go to the project view. From 97c03000ed556025e3f4630cd908b3a9c0b715a9 Mon Sep 17 00:00:00 2001 From: Catherine Luse Date: Tue, 25 Jun 2019 13:14:15 -0700 Subject: [PATCH 36/78] Put hardware requirments in RancherOS installation steps --- .../running-rancheros/cloud/do/_index.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md b/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md index 2ad00f644..9390b0092 100644 --- a/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md +++ b/content/os/v1.x/en/installation/running-rancheros/cloud/do/_index.md @@ -5,32 +5,27 @@ weight: 107 RancherOS is avaliable in the Digital Ocean portal. RancherOS is a member of container distributions and you can find it easily. -## Prerequisites - >**Note** >Deploying to Digital Ocean will incur charges. -Make sure your Digital Ocean droplet has the [minimum hardware requirements for RancherOS]({{< baseurl >}}os/v1.x/en/overview/#hardware-requirements). - -## Creating a Droplet with RancherOS - -To start a RancherOS droplet on Digital Ocean: +To start a RancherOS Droplet on Digital Ocean: 1. In the Digital Ocean portal, go to the project view. 1. Click **New Droplet.** 1. Click **Create Droplet.** 1. Click the **Container distributions** tab. 1. Click **RancherOS.** -1. Choose any options for plan, backups, block storage, and datacenter region. +1. Choose a plan. Make sure your Droplet has the [minimum hardware requirements for RancherOS]({{< baseurl >}}os/v1.x/en/overview/#hardware-requirements). +1. Choose any options for backups, block storage, and datacenter region. 1. Optional: In the **Select additional options** section, you can check the **User data** box and enter a `cloud-config` file in the text box that appears. The `cloud-config` file is used to provide a script to be run on the first boot. An example is below. 1. Choose an SSH key that you have access to, or generate a new SSH key. 1. Choose your project. 1. Click **Create.** -You can access the host via SSH after the droplet is booted. The default user is `rancher`. +You can access the host via SSH after the Droplet is booted. The default user is `rancher`. -Below is an example `cloud-config` file that you can use to initialize the droplet with user data, such as deploying Rancher: +Below is an example `cloud-config` file that you can use to initialize the Droplet with user data, such as deploying Rancher: ``` #cloud-config From 3d3ff0de4d58772f710619067b6e171c674a877d Mon Sep 17 00:00:00 2001 From: Erik Wilson Date: Wed, 26 Jun 2019 10:04:21 -0700 Subject: [PATCH 37/78] Update k3s docs per comments --- content/k3s/latest/en/configuration/_index.md | 6 +++--- content/k3s/latest/en/installation/_index.md | 12 ++++++------ content/k3s/latest/en/quick-start/_index.md | 4 ++-- content/k3s/latest/en/running/_index.md | 16 ++++++++++------ 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/content/k3s/latest/en/configuration/_index.md b/content/k3s/latest/en/configuration/_index.md index 0135e5e41..3c7e4728f 100644 --- a/content/k3s/latest/en/configuration/_index.md +++ b/content/k3s/latest/en/configuration/_index.md @@ -83,7 +83,7 @@ yes then you just need to run the agent with the `--docker` flag. k3s will generate config.toml for containerd in `/var/lib/rancher/k3s/agent/etc/containerd/config.toml`, for advanced customization for this file you can create another file called `config.toml.tmpl` in the same directory and it will be used instead. -The `config.toml.tmpl` will be treated as a Golang template file, and the `config.Node` structure is being passed to the template,the following is an example on how to use the structure to customize the configuration file https://github.com/rancher/k3s/blob/master/pkg/agent/templates/templates.go#L16-L32 +The `config.toml.tmpl` will be treated as a Golang template file, and the `config.Node` structure is being passed to the template, the following is an example on how to use the structure to customize the configuration file https://github.com/rancher/k3s/blob/master/pkg/agent/templates/templates.go#L16-L32 Rootless -------- @@ -93,7 +93,7 @@ _**WARNING**:_ Some advanced magic, user beware Initial rootless support has been added but there are a series of significant usability issues surrounding it. We are releasing the initial support for those interested in rootless and hopefully some people can help to improve the usability. First ensure you have proper setup and support for user namespaces. Refer to the -[requirements section](https://github.com/rootless-containers/rootlesskit#setup) in rootlesskit for instructions. +[requirements section](https://github.com/rootless-containers/rootlesskit#setup) in RootlessKit for instructions. In short, latest Ubuntu is your best bet for this to work. @@ -123,7 +123,7 @@ In short, latest Ubuntu is your best bet for this to work. **Running w/ Rootless**: Just add `--rootless` flag to either server or agent. So run `k3s server --rootless` and then look for the message -`Wrote kubeconfig [SOME PATH]` for where your kubeconfig to access you cluster is. Becareful, if you use `-o` to write +`Wrote kubeconfig [SOME PATH]` for where your kubeconfig to access you cluster is. Be careful, if you use `-o` to write the kubeconfig to a different directory it will probably not work. This is because the k3s instance in running in a different mount namespace. diff --git a/content/k3s/latest/en/installation/_index.md b/content/k3s/latest/en/installation/_index.md index 980deee37..04cf298ae 100644 --- a/content/k3s/latest/en/installation/_index.md +++ b/content/k3s/latest/en/installation/_index.md @@ -9,7 +9,7 @@ Install Script -------------- The install script will attempt to download the latest release, to specify a specific -version for download we can use the `INSTALL_K3S_VERSION` environment variable, eg: +version for download we can use the `INSTALL_K3S_VERSION` environment variable, for example: ```sh curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=vX.Y.Z-rc1 sh - ``` @@ -20,7 +20,7 @@ environment variable to the command: curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--disable-agent" sh - ``` -The installer can also be run without performing downloads by setting `INSTALL_K3S_SKIP_DOWNLOAD=true`, eg: +The installer can also be run without performing downloads by setting `INSTALL_K3S_SKIP_DOWNLOAD=true`, for example: ```sh curl -sfL https://github.com/rancher/k3s/releases/download/vX.Y.Z/k3s -o /usr/local/bin/k3s chmod 0755 /usr/local/bin/k3s @@ -228,11 +228,11 @@ The following information on server options is also available through `k3s serve * `--node-label` _value_ - (agent) Registring kubelet with set of labels + (agent) Registering kubelet with set of labels * `--node-taint` _value_ - (agent) Registring kubelet with set of taints + (agent) Registering kubelet with set of taints Agent Options ------------------ @@ -305,11 +305,11 @@ The following information on agent options is also available through `k3s agent * `--node-label` _value_ - (agent) Registring kubelet with set of labels + (agent) Registering kubelet with set of labels * `--node-taint` _value_ - (agent) Registring kubelet with set of taints + (agent) Registering kubelet with set of taints Customizing components ---------------------- diff --git a/content/k3s/latest/en/quick-start/_index.md b/content/k3s/latest/en/quick-start/_index.md index a54bcb426..e24d414c2 100644 --- a/content/k3s/latest/en/quick-start/_index.md +++ b/content/k3s/latest/en/quick-start/_index.md @@ -15,7 +15,7 @@ curl -sfL https://get.k3s.io | sh - ``` A kubeconfig file is written to `/etc/rancher/k3s/k3s.yaml` and the service is automatically started or restarted. -The install script will install k3s and additional utilities, such as `kubectl`, `crictl`, `k3s-killall.sh`, and `k3s-uninstall.sh`, eg: +The install script will install k3s and additional utilities, such as `kubectl`, `crictl`, `k3s-killall.sh`, and `k3s-uninstall.sh`, for example: ```bash sudo kubectl get nodes @@ -23,7 +23,7 @@ sudo kubectl get nodes `K3S_TOKEN` is created at `/var/lib/rancher/k3s/server/node-token` on your server. To install on worker nodes we should pass `K3S_URL` along with -`K3S_TOKEN` or `K3S_CLUSTER_SECRET` environment variables, eg: +`K3S_TOKEN` or `K3S_CLUSTER_SECRET` environment variables, for example: ```bash curl -sfL https://get.k3s.io | K3S_URL=https://myserver:6443 K3S_TOKEN=XXX sh - ``` diff --git a/content/k3s/latest/en/running/_index.md b/content/k3s/latest/en/running/_index.md index 4810494f1..3d085171d 100644 --- a/content/k3s/latest/en/running/_index.md +++ b/content/k3s/latest/en/running/_index.md @@ -9,7 +9,11 @@ Starting the Server ------------------ The installation script will auto-detect if your OS is using systemd or openrc and start the service. -When running with openrc logs will be created at `/var/log/k3s.log`, or with systemd in `/var/log/syslog` and viewed using `journalctl -u k3s`. +When running with openrc logs will be created at `/var/log/k3s.log`, or with systemd in `/var/log/syslog` and viewed using `journalctl -u k3s`. An example of installing and auto-starting with the install script: + +```bash +curl -sfL https://get.k3s.io | sh - +``` When running the server manually you should get an output similar to: @@ -137,7 +141,7 @@ Then update **/etc/update-extlinux.conf** by adding: default_kernel_opts="... cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory" ``` -Than update the config and reboot +Then update the config and reboot: ```bash update-extlinux @@ -155,7 +159,7 @@ Running in Docker (and docker-compose) [k3d](https://github.com/rancher/k3d) is a utility designed to easily run k3s in Docker. It can be installed via the [brew](https://brew.sh/) utility for MacOS. `rancher/k3s` images are also available to run k3s server and agent from Docker. A `docker-compose.yml` is in the root of the k3s repo that -serves as an example of how to run k3s from Docker. To run from `docker-compose` from this repo run +serves as an example of how to run k3s from Docker. To run from `docker-compose` from this repo run: docker-compose up --scale node=3 # kubeconfig is written to current dir @@ -186,7 +190,7 @@ serves as an example of how to run k3s agent from Docker. Alternatively the Dock Air-Gap Support --------------- -k3s supports pre-loading of containerd images by placing them in the `images` directory for the agent before starting, eg: +k3s supports pre-loading of containerd images by placing them in the `images` directory for the agent before starting, for example: ```sh sudo mkdir -p /var/lib/rancher/k3s/agent/images/ sudo cp ./k3s-airgap-images-$ARCH.tar /var/lib/rancher/k3s/agent/images/ @@ -206,7 +210,7 @@ k3s additionally provides a `--resolv-conf` flag for kubelets, which may help wi Upgrades -------- -To upgrade k3s from an older version you can re-run the installation script using the same flags, eg: +To upgrade k3s from an older version you can re-run the installation script using the same flags, for example: ```sh curl -sfL https://get.k3s.io | sh - @@ -253,4 +257,4 @@ Hyperkube k3s is bundled in a nice wrapper to remove the majority of the headache of running k8s. If you don't want that wrapper and just want a smaller k8s distro, the releases includes the `hyperkube` binary you can use. It's then up to you to know how to use `hyperkube`. If -you want individual binaries you will need to compile them yourself from source +you want individual binaries you will need to compile them yourself from source. From d84306758f88d835974eea602d1cac10d5eab2cc Mon Sep 17 00:00:00 2001 From: Erik Wilson Date: Wed, 26 Jun 2019 10:42:04 -0700 Subject: [PATCH 38/78] Add k3s card --- content/_index.html | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/content/_index.html b/content/_index.html index f51b65683..f953b4327 100644 --- a/content/_index.html +++ b/content/_index.html @@ -199,6 +199,33 @@
  • +
    +
    +

    + K3S + K3S +

    + +
    + +

    Lightweight Kubernetes. Easy to install, half the memory, all in a binary less than 40mb.

    + + +
    +