|
| 1 | +### Install Docker and Docker Compose |
| 2 | + |
| 3 | +Install Docker on the host where you want to install Kubeaver using the official Docker guide: [Install Docker Engine](https://docs.docker.com/engine/install/). After installation, run the `docker compose version` command to ensure Docker Compose is correctly installed. If not, manually install Docker Compose. |
| 4 | + |
| 5 | +### Deploy Kubeaver |
| 6 | + |
| 7 | +Download Kubeaver code: |
| 8 | +``` |
| 9 | +git clone https://github.com/eb-k8s/kubeaver.git |
| 10 | +``` |
| 11 | + |
| 12 | +Start Kubeaver using Docker Compose: |
| 13 | +``` |
| 14 | +# Switch to the directory containing the Docker Compose file |
| 15 | +cd ./deploy |
| 16 | +# Start Kubeaver |
| 17 | +docker compose up -d |
| 18 | +``` |
| 19 | + |
| 20 | +After this, Kubeaver will be successfully installed on your host. You can now access it via port 80. |
| 21 | + |
| 22 | +### Offline Package Import |
| 23 | + |
| 24 | +Download the corresponding version of the offline package based on the K8s cluster version you plan to install. |
| 25 | +Download the offline package: |
| 26 | +``` |
| 27 | +docker pull ghcr.io/eb-k8s/kubeaver/kubeaver_offline:v1.32.4 |
| 28 | +docker pull ghcr.io/eb-k8s/kubeaver/kubeaver_oslib:v1.0 |
| 29 | +docker run -d ghcr.io/eb-k8s/kubeaver/kubeaver_offline:v1.32.4 --name kubeaver_offline |
| 30 | +docker run -d ghcr.io/eb-k8s/kubeaver/kubeaver_oslib:v1.0 --name kubeaver_oslib |
| 31 | +docker cp kubeaver_offline:/root/base_k8s_v1.32.4.tgz . |
| 32 | +docker cp kubeaver_oslib:/root/extend_CentOS_7_Core.tgz . |
| 33 | +``` |
| 34 | +You can then obtain the offline package `base_k8s_v1.32.4.tgz、extend_CentOS_7_Core.tgz` and import it into Kubeaver. |
| 35 | + |
| 36 | +### Deploy a K8s Cluster |
| 37 | + |
| 38 | +1. Add the hosts where you want to deploy the K8s cluster in the **Host Management** section. |
| 39 | +2. Click the **Offline Package Import** button on the offline package management interface to import the offline package you just downloaded. |
| 40 | +3. In the **Cluster Management** interface, create your cluster by selecting the cluster version, network plugin, and the hosts included in the cluster. |
| 41 | +4. Click **Save**, then select the newly created cluster in the **Cluster Management** interface and click **Deploy** to start the deployment. |
| 42 | +5. View the status and progress of tasks in the **Task Queue** or check running/completed tasks in the **Task History**. |
| 43 | + |
| 44 | +### Conformance Test |
| 45 | + |
| 46 | +The standard tool for running these tests is |
| 47 | +[Sonobuoy](https://github.com/heptio/sonobuoy). Sonobuoy is |
| 48 | +regularly built and kept up to date to execute against all |
| 49 | +currently supported versions of kubernetes. |
| 50 | + |
| 51 | +Download a [binary release](https://github.com/heptio/sonobuoy/releases) of the CLI |
| 52 | + |
| 53 | +Deploy a Sonobuoy pod to your cluster with: |
| 54 | + |
| 55 | +``` |
| 56 | +$ sonobuoy run --mode=certified-conformance |
| 57 | +``` |
| 58 | + |
| 59 | +**NOTE:** You can run the command synchronously by adding the flag `--wait` but be aware that running the Conformance tests can take an hour or more. |
| 60 | + |
| 61 | +View actively running pods: |
| 62 | + |
| 63 | +``` |
| 64 | +$ sonobuoy status |
| 65 | +``` |
| 66 | + |
| 67 | +To inspect the logs: |
| 68 | + |
| 69 | +``` |
| 70 | +$ sonobuoy logs |
| 71 | +``` |
| 72 | + |
| 73 | +Once `sonobuoy status` shows the run as `completed`, copy the output directory from the main Sonobuoy pod to a local directory: |
| 74 | + |
| 75 | +``` |
| 76 | +$ outfile=$(sonobuoy retrieve) |
| 77 | +``` |
| 78 | + |
| 79 | +This copies a single `.tar.gz` snapshot from the Sonobuoy pod into your local |
| 80 | +`.` directory. Extract the contents into `./results` with: |
| 81 | + |
| 82 | +``` |
| 83 | +mkdir ./results; tar xzf $outfile -C ./results |
| 84 | +``` |
| 85 | + |
| 86 | +**NOTE:** The two files required for submission are located in the tarball under **plugins/e2e/results/{e2e.log,junit.xml}**. |
| 87 | + |
| 88 | +To clean up Kubernetes objects created by Sonobuoy, run: |
| 89 | + |
| 90 | +``` |
| 91 | +sonobuoy delete |
| 92 | +``` |
0 commit comments