Deploy K3s and KubeSphere
You can use KubeKey to install both K3s and KubeSphere while KubeSphere can also be deployed on an existing K3s cluster.
Note
Currently, KubeSphere on K3s is only for testing and development as some features have not been fully tested.
- For information about the prerequisites for K3s installation, see the K3s documentation.
Follow the step below to download .
Download KubeKey from its GitHub Release Page or use the following command directly.
Run the following command first to make sure you download KubeKey from the correct zone.
Run the following command to download KubeKey:
curl -sfL https://get-kk.kubesphere.io | VERSION=v1.2.0 sh -
After you download KubeKey, if you transfer it to a new machine also with poor network connections to Googleapis, you must run export KKZONE=cn
again before you proceed with the steps below.
Note
The commands above download the latest release (v1.2.0) of KubeKey. Note that an earlier version of KubeKey cannot be used to install K3s.
Make executable:
Create a configuration file of your cluster by running the following command:
./kk create config --with-kubernetes v1.21.4-k3s --with-kubesphere v3.2.0
Note
KubeKey v1.2.0 supports the installation of K3s v1.21.4.
Save the file and execute the following command to install K3s and KubeSphere:
./kk create cluster -f config-sample.yaml
When the installation finishes, you can inspect installation logs with the following command:
Expected output:
Access the KubeSphere console at with the default account and password (
admin/[[email protected]](https://kubesphere.io/cdn-cgi/l/email-protection)
).
Note