I did a pass of reviewing the docs and identified these mostly minor changes. I may be wrong in some of my feedback. Don't take it for gospel.
The intent of this guide is to quickly launch a cluster that you can use to evaluate k3s. This guide is not intended for production environments. Production environments should utilize a High-Availiability solution. The installation options section covers in greater detail how k3s can be setup.
To install on worker nodes and add them to the cluster, we should pass K3S_URL along with K3S_TOKEN or K3S_CLUSTER_SECRET environment variables. K3S_TOKEN is created at /var/lib/rancher/k3s/server/node-token on your server. Here is an example showing how to join a node...
Install k3s on a single Linux host. Single master installs are recommended for development and test environments, as setup is simple and the cluster doesnât have to be readily available for a user-base.
- [x] _Same note as above: don't block single-node out of production completely._
k3s is very lightweight, but has some minimum requirements as outlined below.
In a separate conversation a month or so ago we (not sure who all) suggested k3s should always be lowercase.
Two nodes cannot have the same hostname. If all your nodes have the same hostname, pass --node-name or $K3S_NODE_NAME with a unique name for each node you add to the cluster.
Networking
Let's do this after v1.0 release or if we have spare time around this time as a lower-priority.
This section contains information on flags and environment variables used for starting a single-master (non-HA) k3s cluster. A High-Availability (HA) k3s cluster is required for production. A single server install is intended only for development and testing environments.
To specify a specific version for download we can use the
Server Options and Agent Options
Note https://github.com/rancher/k3s/issues/1035 is being used to track general cli changes but the other comments are valid here; for example the look of the flags in the docs.
To install with a specific flag we can use the INSTALL_K3S_EXEC environment variable. For example
The full help text for the install script environment variables are as follows: - K3S_*
If set to âskipâ will not create symlinks, âforceâ will overwrite, default will symlink if command does not exist in path.
INSTALL_K3S_EXEC or script arguments
I agree; I'm not quite sure what it means - need to sync with Erik.
Name of systemd service to create, will default from the k3s exec command if not specified. If specified the name will be prefixed with âk3s-â.
--data-dir value, -d value
Folder to hold state default /var/lib/rancher/k3s or ${HOME}/.rancher/k3s if not root
This is a CLI help issue that will have to be addressed via https://github.com/rancher/k3s/issues/1601
--write-kubeconfig-mode value
Write kubeconfig with this mode [$K3S_KUBECONFIG_MODE]
This is a CLI help issue that will have to be addressed via https://github.com/rancher/k3s/issues/1601
--no-deploy value
Do not deploy packaged components (val
Tracked in https://github.com/rancher/k3s/issues/1035 so I'll check this off as complete as will be handled separately.
--kube-apiserver-arg value
Customized flag for kube-apiserver process
https://github.com/rancher/k3s/issues/1601
--advertise-address value
IP address that apiserver uses to advertise to members of the cluster
https://github.com/rancher/k3s/issues/1601
--docker
(agent) Use docker instead of containerd
I don't think so -- just my opinion; leaving it as-is for now.
This whole doc is laid out in a confusing way. Was not clear to me that the âAlpine Linuxâ section was an alternative to the install script. This is layout thing, so don't need to do until we finish the current refactor and see how things are.
As we recently discussed 11/11/19 probably no? FAQ should be fairly quick questions and answers which can hyperlink to sections in docs if needed. We may want to revisit this later with another solution. Needs discussion. -- actually we can handle via https://github.com/rancher/k3s/issues/1582
Agree. I am going to handle this separately in this issue: https://github.com/rancher/k3s/issues/1051 as such I've marked it as resolved by checking the checkbox here.
When running the server manually you should get an output similar to:
Respectfully disagree here. We should use the proper article and thus "an" (followed by vowel-sound). Ex: "I'll be there in an hour"
If networking is completely disabled k3s may not be able to start (ie ethernet unplugged or wifi disconnected), in which case it may be necessary to add a default route. For example:
âŠ
k3s additionally provides a --resolv-conf flag for kubelets, which may help with configuring DNS in air-gap networks.
If you installed k3s with the help of install.sh script an uninstall script is generated during installation, which will be created on your server node at /usr/local/bin/k3s-uninstall.sh (or as k3s-agent-uninstall.sh).
Must have already been fixed in an unrelated PR recently so I checked this one off as done.
hyperkube
We completely removed the little hyperkube section per our conversations recently. We plan to eventually remove support so we are starting with docs.
Open Ports / Network Securitylink
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
Metrics Server
Already to be addressed in this separate issue: https://github.com/rancher/k3s/issues/991
Storage backends
Already has bee moved to the ha install page as it made sense to go there. See https://github.com/rancher/docs/pull/1985 for details.
Specify etcd, Mysql, Postgres, or Sqlite (default) data source name [$K3S_STORAGE_ENDPOINT]
Nothing we can do, we can tweak styling in a separate issue if needed.
Can we change "Installation Options" to just "Installation". Thats what we call it in the rancher docs
Ok, one final set of tweaks are needed for the HA diagram:
On https://rancher.com/docs/k3s/latest/en/installation/ha/
A load balancer to expose the Kubernetes API for worker node registration and admin access via kubectl
This should be reworded to "A load balancer to expose the Kubernetes API for clients such as kubectl and to expose a stable k3s worker registration endpoint"
The current wording conflates the k8s api with node registration.
On https://rancher.com/docs/k3s/latest/en/installation/ha/
The HA database shown should be a single endpoint k3s can access such as a load balancer.
Drop "such as a load balancer". As previously discussed, the topic of load balanced sql databases is not a can of worms we need to open.
Moved to v1.x - Backlog milestone to review post-kubecon release. There are some unaddressed valid concerns in this issue that are lower priority. Otherwise most of the checked off items (and all comments on the issue so far) will be addressed in https://github.com/rancher/docs/pull/1990
Remaining issues have either been resolved in other recent updates to docs or as a part of my new PR https://github.com/rancher/docs/pull/2410
I have two remaining areas I need to investigate as outlined below.
Advanced:
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
Airgap:
If networking is completely disabled k3s may not be able to start (ie ethernet unplugged or wifi disconnected), in which case it may be necessary to add a default route. For example:
âŠ
k3s additionally provides a --resolv-conf flag for kubelets, which may help with configuring DNS in air-gap networks.
Changes in, assign to Hussein to work on remaining part:
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
_This needs improved. What is the config.Node that it is referencing?_
Closing this as it's complete - we'll handle the remaining area via https://github.com/rancher/k3s/issues/1932