All-in-One Installation on Linux
Step 1: Prepare a Linux Machine
To get started with all-in-one installation, you only need to prepare one host according to the following requirements for hardware and operating system.
Note
The system requirements above and the instructions below are for the default minimal installation without any pluggable components enabled. If your machine has at least 8 cores and 16G memory, it is recommended that you enable all components. For more information, see .
- The node can be accessed through .
sudo
/curl
/openssl
should be used.docker
can be installed by yourself or by KubeKey.
Note
docker
must be installed in advance if you want to deploy KubeSphere in an offline environment.
KubeKey can install Kubernetes and KubeSphere together. The dependency that needs to be installed may be different based on the Kubernetes version to be installed. You can refer to the list below to see if you need to install relevant dependencies on your node in advance.
Dependency | Kubernetes Version ≥ 1.18 | Kubernetes Version < 1.18 |
---|---|---|
socat | Required | Optional but recommended |
conntrack | Required | Optional but recommended |
ebtables | Optional but recommended | Optional but recommended |
ipset | Optional but recommended | Optional but recommended |
Info
Developed in Go language, KubeKey represents a brand-new installation tool as a replacement for the ansible-based installer used before. KubeKey provides users with flexible installation choices, as they can install KubeSphere and Kubernetes separately or install them at one time, which is convenient and efficient.
- If your network configuration uses firewall rules or security groups, you must ensure infrastructure components can communicate with each other through specific ports. It is recommended that you turn off the firewall. For more information, see .
Tip
- It is recommended that your OS be clean (without any other software installed). Otherwise, there may be conflicts.
- It is recommended that a registry mirror (a booster) be prepared if you have trouble downloading images from
dockerhub.io
. For more information, see Configure a Booster for Installation.
Download KubeKey from its or use the following command directly.
Run the following command first to make sure you download KubeKey from the correct zone.
export KKZONE=cn
Run the following command to download KubeKey:
Note
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.1.0) of KubeKey. You can change the version number in the command to download a specific version.
Make executable:
chmod +x kk
Step 3: Get Started with Installation
In this tutorial, you only need to execute one command for installation, the template of which is shown below:
./kk create cluster --with-kubernetes v1.20.4 --with-kubesphere v3.1.0
Note
- Recommended Kubernetes versions for KubeSphere v3.1.0: v1.17.9, v1.18.8, v1.19.8 and v1.20.4. If you do not specify a Kubernetes version, KubeKey will install Kubernetes v1.19.8 by default. For more information about supported Kubernetes versions, see .
- For all-in-one installation, generally speaking, you do not need to change any configuration.
- If you do not add the flag
--with-kubesphere
in the command in this step, KubeSphere will not be deployed. KubeKey will install Kubernetes only. If you add the flag--with-kubesphere
without specifying a KubeSphere version, the latest version of KubeSphere will be installed. - KubeKey will install OpenEBS to provision LocalPV for the development and testing environment by default, which is convenient for new users. For other storage classes, see .
After you execute the command, you will see a table for environment check. For details, read Node requirements and above. Input yes
to continue.
When you see the output as below, it means the installation finishes.
Input the following command to check the result.
The output displays the IP address and port number of the web console, which is exposed through NodePort 30880
by default. Now, you can access the console at <NodeIP>:30880
with the default account and password (admin/[[email protected]](https://kubesphere.io/cdn-cgi/l/email-protection)
).
#####################################################
### Welcome to KubeSphere! ###
#####################################################
Password: [email protected]
NOTES:
1. After logging into the console, please check the
monitoring status of service components in
the "Cluster Management". If any service is not
ready, please wait patiently until all components
are ready.
2. Please modify the default password after login.
#####################################################
https://kubesphere.io 20xx-xx-xx xx:xx:xx
#####################################################
Note
You may need to configure port forwarding rules and open the port in your security group so that external users can access the console.
After logging in to the console, you can check the status of different components in Components. You may need to wait for some components to be up and running if you want to use related services. You can also use to inspect the running status of KubeSphere workloads.
Enable Pluggable Components (Optional)
The guide above is used only for the minimal installation by default. To enable other components in KubeSphere, see for more details.