mirror of
https://github.com/kubesphere/website.git
synced 2025-12-26 00:12:48 +00:00
add air-gapped-installation.md, fix mistaken word in agent-connection.md
Signed-off-by: FeynmanZhou <pengfeizhou@yunify.com>
This commit is contained in:
parent
6d83e9034f
commit
34f70821ee
|
|
@ -0,0 +1,109 @@
|
|||
---
|
||||
title: "Installing KubeSphere Air-gapped"
|
||||
keywords: 'Multi-node, Installation, KubeSphere'
|
||||
description: 'Multi-node Installation Overview'
|
||||
|
||||
linkTitle: "Multi-node Installation"
|
||||
weight: 2112
|
||||
---
|
||||
|
||||
The air-gapped installation is almost the same as the online installation except it creates a local registry to host the Docker images. We will demonstrate how to install KubeSphere and Kubernetes on air-gapped environment.
|
||||
|
||||
## Step 1: Prepare Linux Hosts
|
||||
|
||||
Please see the requirements for hardware and operating system shown below. To get started with multi-node installation, you need to prepare at least three hosts according to the following requirements.
|
||||
|
||||
### System Requirements
|
||||
|
||||
| Systems | Minimum Requirements (Each node) |
|
||||
| ------------------------------------------------------ | ------------------------------------------- |
|
||||
| **Ubuntu** *16.04, 18.04* | CPU: 2 Cores, Memory: 4 G, Disk Space: 40 G |
|
||||
| **Debian** *Buster, Stretch* | CPU: 2 Cores, Memory: 4 G, Disk Space: 40 G |
|
||||
| **CentOS** *7*.x | CPU: 2 Cores, Memory: 4 G, Disk Space: 40 G |
|
||||
| **Red Hat Enterprise Linux 7** | CPU: 2 Cores, Memory: 4 G, Disk Space: 40 G |
|
||||
| **SUSE Linux Enterprise Server 15/openSUSE Leap 15.2** | CPU: 2 Cores, Memory: 4 G, Disk Space: 40 G |
|
||||
|
||||
{{< notice note >}}
|
||||
|
||||
Installer will use `/var/lib/docker` as the default directory where all Docker related files, including the images, are stored. We recommend you to add additional storage to a disk with at least **100G** mounted at `/var/lib/docker` and `/mnt/registry` respectively. See [fdisk](https://www.computerhope.com/unix/fdisk.htm) command for reference.
|
||||
|
||||
{{</ notice >}}
|
||||
|
||||
### Node Requirements
|
||||
|
||||
**Important**
|
||||
|
||||
- It's recommended that your OS be clean (without any other software installed). Otherwise, there may be conflicts.
|
||||
- Ensure your disk of each node is at least **100G**.
|
||||
- All nodes must be accessible through `SSH`.
|
||||
- Time synchronization for all nodes.
|
||||
- `sudo`/`curl`/`openssl` should be used in all nodes.
|
||||
- `docker` must be installed by yourself 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 |
|
||||
|
||||
### Network and DNS Requirements
|
||||
|
||||
- Make sure the DNS address in `/etc/resolv.conf` is available. Otherwise, it may cause some issues of DNS in clusters.
|
||||
- If your network configuration uses Firewall or Security Group, you must ensure infrastructure components can communicate with each other through specific ports. It's recommended that you turn off the firewall or follow the guide [Network Access](https://github.com/kubesphere/kubekey/blob/master/docs/network-access.md).
|
||||
|
||||
### Example Machines
|
||||
|
||||
This example includes three hosts as below with the master node serving as the taskbox.
|
||||
|
||||
| Host IP | Host Name | Role |
|
||||
| ----------- | --------- | ------------ |
|
||||
| 192.168.0.2 | master | master, etcd |
|
||||
| 192.168.0.3 | node1 | worker |
|
||||
| 192.168.0.4 | node2 | worker |
|
||||
|
||||
## Step 2: Prepare a Private Image Registry
|
||||
|
||||
You can use Harbor or any other private image registries, we take Docker registry as an example, using [self-signed certificates](https://docs.docker.com/registry/insecure/) (If you have your own private image registry, you can skip this step).
|
||||
|
||||
### Use self-signed certificates
|
||||
|
||||
Generate your own certificate:
|
||||
|
||||
```bash
|
||||
mkdir -p certs
|
||||
```
|
||||
|
||||
```bash
|
||||
openssl req \
|
||||
-newkey rsa:4096 -nodes -sha256 -keyout certs/domain.key \
|
||||
-x509 -days 36500 -out certs/domain.crt
|
||||
```
|
||||
|
||||
Be sure to specify a domain name in the field **Common Name** when you are generating your own certificate, for example, we use `dockerhub.kubesphere.local` in this example:
|
||||
|
||||

|
||||
|
||||
### Start Docker Registry
|
||||
|
||||
Run the following command to start the Docker registry:
|
||||
|
||||
```
|
||||
docker run -d \
|
||||
--restart=always \
|
||||
--name registry \
|
||||
-v "$(pwd)"/certs:/certs \
|
||||
-v /mnt/registry:/var/lib/registry \
|
||||
-e REGISTRY_HTTP_ADDR=0.0.0.0:443 \
|
||||
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \
|
||||
-e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \
|
||||
-p 443:443 \
|
||||
registry:2
|
||||
```
|
||||
|
||||
### Configure the Access
|
||||
|
||||
TBD
|
||||
|
|
@ -144,7 +144,7 @@ jwtSecret: "gfIwilcc0WjNGKJ5DLeksf2JKfcLgTZU"
|
|||
|
||||
{{< tab "KubeSphere has been installed" >}}
|
||||
|
||||
If you already have a standalone KubeSphere installed, you can change the `clusterRole` to a host cluster by editing the cluster configuration and **wait for a while**.
|
||||
If you already have a standalone KubeSphere installed, you can change the `clusterRole` to a member cluster by editing the cluster configuration and **wait for a while**.
|
||||
|
||||
- Option A - Use Web Console:
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 127 KiB |
Loading…
Reference in New Issue