# KubeKey
[![CI](https://github.com/kubesphere/kubekey/workflows/CI/badge.svg?branch=master&event=push)](https://github.com/kubesphere/kubekey/actions?query=event%3Apush+branch%3Amaster+workflow%3ACI+)
> English | [中文](README_zh-CN.md)
Since v3.0.0, [KubeSphere](https://kubesphere.io) changes the ansible-based installer to the new installer called KubeKey that is developed in Go language. With KubeKey, you can install Kubernetes and KubeSphere separately or as a whole easily, efficiently and flexibly.
There are three scenarios to use KubeKey.
* Install Kubernetes only
* Install Kubernetes and KubeSphere together in one command
* Install Kubernetes first, then deploy KubeSphere on it using [ks-installer](https://github.com/kubesphere/ks-installer)
> **Important:** If you have existing clusters, please refer to [ks-installer (Install KubeSphere on existing Kubernetes cluster)](https://github.com/kubesphere/ks-installer).
## Motivation
* Ansible-based installer has a bunch of software dependency such as Python. KubeKey is developed in Go language to get rid of the problem in a variety of environment so that increasing the success rate of installation.
* KubeKey uses Kubeadm to install K8s cluster on nodes in parallel as much as possible in order to reduce installation complexity and improve efficiency. It will greatly save installation time compared to the older installer.
* KubeKey supports for scaling cluster from allinone to multi-node cluster, even an HA cluster.
* KubeKey aims to install cluster as an object, i.e., CaaO.
## Supported Environment
### Linux Distributions
* **Ubuntu** *16.04, 18.04*
* **Debian** *Buster, Stretch*
* **CentOS/RHEL** *7*
* **SUSE Linux Enterprise Server** *15*
### <span id = "KubernetesVersions">Kubernetes Versions</span>
* **v1.15**:   *v1.15.12*
* **v1.16**:   *v1.16.13*
* **v1.17**:   *v1.17.9* (default)
* **v1.18**:   *v1.18.6*
> Looking for more supported versions [Click here](./docs/kubernetes-versions.md)
> Notice: KubeSphere is currently not supported running on k8s v1.19.x
## Requirements and Recommendations
* Minimum resource requirements (For Minimal Installation of KubeSphere only):
* 2 vCPUs
* 4 GB RAM
* 20 GB Storage
> /var/lib/docker is mainly used to store the container data, and will gradually increase in size during use and operation. In the case of a production environment, it is recommended that /var/lib/docker mounts a drive separately.
* OS requirements:
* `SSH` can access to all nodes.
* Time synchronization for all nodes.
* `sudo`/`curl`/`openssl` should be used in all nodes.
* `docker` can be installed by yourself or by KubeKey.
* `Red Hat` includes `SELinux` in its `Linux release`. It is recommended to close SELinux or [switch the mode of SELinux](./docs/turn-off-SELinux.md) to `Permissive`
> * It's recommended that Your OS is clean (without any other software installed), otherwise there may be conflicts.
> * A container image mirror (accelerator) is recommended to be prepared if you have trouble downloading images from dockerhub.io. [Configure registry-mirrors for the Docker daemon](https://docs.docker.com/registry/recipes/mirror/#configure-the-docker-daemon).
> * KubeKey will install [OpenEBS](https://openebs.io/) to provision LocalPV for development and testing environment by default, this is convenient for new users. For production, please use NFS / Ceph / GlusterFS or commercial products as persistent storage, and install the [relevant client](docs/storage-client.md) in all nodes.
> * If you encounter `Permission denied` when copying, it is recommended to check [SELinux and turn off it](./docs/turn-off-SELinux.md) first
* Dependency requirements:
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.
| | 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 |
* Networking and DNS requirements:
* Make sure the DNS address in `/etc/resolv.conf` is available. Otherwise, it may cause some issues of DNS in cluster.
* 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 link configuriation: [NetworkAccess](docs/network-access.md).
## Usage
### Get the Installer Executable File
* Binary downloads of the KubeKey can be found on the [Releases page](https://github.com/kubesphere/kubekey/releases).
Unpack the binary and you are good to go!
* Build Binary from Source Code
```shell script
git clone https://github.com/kubesphere/kubekey.git
cd kubekey
./build.sh
```
> Note:
>
> * Docker needs to be installed before building.
> * If you have problem to access `https://proxy.golang.org/`, excute `build.sh -p` instead.
<!--
### YUM
Add YUM source repo by the following command:
```
cat > bintray-kubesphere-rpm.repo <<EOF
#bintraybintray-kubesphere-rpm - packages by kubesphere from Bintray
[bintraybintray-kubesphere-rpm]
name=bintray-kubesphere-rpm
baseurl=https://dl.bintray.com/kubesphere/rpm
gpgcheck=0
repo_gpgcheck=0
enabled=1
EOF
sudo mv bintray-kubesphere-rpm.repo /etc/yum.repos.d/ && sudo yum update
```
then you can install it by: `yum install kk`
### Debian
Add deb source repo by the following command:
```
echo "deb [trusted=yes] https://dl.bintray.com/kubesphere/deb wheezy main" | sudo tee -a /etc/apt/sources.list
sudo apt update
```
then you can install it by: `sudo apt-get install kk`
-->
### Create a Cluster
#### Quick Start
Quick Start is for `all-in-one` installation which is a good start to get familiar with KubeSphere.
> Note: Since Kubernetes temporarily does not support uppercase NodeName, contains uppercase letters in the hostname will lead to subsequent installation error
##### Command
> If you have problem to access `https://storage.googleapis.com`, execute first `export KKZONE=cn`.
```shell script
./kk create cluster [--with-kubernetes version] [--with-kubesphere version]
```
##### Examples
* Create a pure Kubernetes cluster with default version.
```shell script
./kk create cluster
```
* Create a Kubernetes cluster with a specified version ([supported versions](#KubernetesVersions)).
```shell script
./kk create cluster --with-kubernetes v1.17.9
```
* Create a Kubernetes cluster with KubeSphere installed (e.g. `--with-kubesphere v3.0.0`)
```shell script
./kk create cluster --with-kubesphere [version]
```
#### Advanced
You have more control to customize parameters or create a multi-node cluster using the advanced installation. Specifically, create a cluster by specifying a configuration file.
> If you have problem to access `https://storage.googleapis.com`, execute first `export KKZONE=cn`.
1. First, create an example configuration file
```shell script
./kk create config [--with-kubernetes version] [--with-kubesphere version] [(-f | --file) path]
```
**examples:**
* create an example config file with default configurations. You also can specify the file that could be a different filename, or in different folder.
```shell script
./kk create config [-f ~/myfolder/abc.yaml]
```
* with KubeSphere
```shell script
./kk create config --with-kubesphere
```
2. Modify the file config-sample.yaml according to your environment
> Note: Sinc
没有合适的资源?快使用搜索试试~ 我知道了~
kubekey:提供了一种灵活,快速和便捷的方式来仅安装Kubernetes和KubeSphere以及相关的云原生附加组件,仅安...
共197个文件
go:116个
yaml:47个
md:14个
5星 · 超过95%的资源 需积分: 50 3 下载量 122 浏览量
2021-02-03
15:59:26
上传
评论
收藏 626KB ZIP 举报
温馨提示
KubeKey English | 从v3.0.0开始, 将基于Ansible的安装程序更改为使用Go语言开发的名为KubeKey的新安装程序。 使用KubeKey,您可以分别,轻松,高效且灵活地安装Kubernetes和KubeSphere。 有三种使用KubeKey的方案。 仅安装Kubernetes 在一个命令中一起安装Kubernetes和KubeSphere 首先安装Kubernetes,然后使用在其上部署KubeSphere 重要提示:如果您已有集群,请参考 。 动机 基于Ansible的安装程序具有大量软件依赖性,例如Python。 KubeKey是使用Go语言开发的
资源详情
资源评论
资源推荐
收起资源包目录
kubekey:提供了一种灵活,快速和便捷的方式来仅安装Kubernetes和KubeSphere以及相关的云原生附加组件,仅安装Kubernetes。 它也是扩展和升级集群的有效工具 (197个子文件)
.all-contributorsrc 6KB
Dockerfile 1KB
.gitignore 482B
tmpl-v1.16+.go 189KB
tmpl-v1.16+.go 36KB
tmpl-v1.16-.go 33KB
tmpl-v1.16-.go 29KB
tmpl.go 20KB
etcd.go 16KB
zz_generated.deepcopy.go 15KB
master.go 14KB
cluster_controller.go 14KB
cluster_types.go 12KB
kubernetes.go 11KB
cert.go 11KB
kubesphere.go 10KB
kubectl-ko.go 10KB
delete.go 10KB
update_cluster.go 10KB
file.go 9KB
network.go 9KB
from_cluster.go 8KB
kubeadm.go 8KB
preinstall.go 8KB
manifests.go 8KB
default.go 8KB
parse.go 7KB
install.go 7KB
os.go 7KB
prepull_images.go 7KB
install.go 7KB
certs.go 7KB
ssh.go 6KB
kubesphere.go 6KB
precheck.go 6KB
cluster.go 6KB
factory.go 6KB
util.go 6KB
openebs.go 6KB
tmpl.go 6KB
install.go 6KB
nodelocaldns.go 5KB
init_os.go 5KB
fake_cluster.go 5KB
nodes.go 5KB
generate.go 5KB
etcd.go 5KB
add.go 5KB
run_task.go 5KB
init_os.go 5KB
types.go 5KB
images.go 4KB
executor.go 4KB
dns.go 4KB
types.go 4KB
install.go 3KB
cluster.go 3KB
upgrade.go 3KB
precheck.go 3KB
docker.go 3KB
completion.go 3KB
etcdbackup.go 3KB
clientset.go 3KB
kubelet.go 3KB
cluster.go 3KB
clientset_generated.go 3KB
kubesphere.go 3KB
main.go 3KB
kubekey_client.go 2KB
network_types.go 2KB
root.go 2KB
suite_test.go 2KB
runner.go 2KB
kubeovn.go 2KB
init.go 2KB
generic.go 2KB
cluster.go 2KB
upgrade.go 2KB
client.go 2KB
register.go 2KB
register.go 2KB
manager.go 2KB
config.go 2KB
version.go 2KB
kubernetes_types.go 2KB
version.go 2KB
add_nodes.go 2KB
storage.go 2KB
register.go 2KB
interface.go 2KB
coredns.go 2KB
interface.go 1KB
addons_types.go 1KB
factory_interfaces.go 1KB
dialer.go 1KB
init_os.go 1KB
groupversion_info.go 1KB
sftp.go 1KB
fake_kubekey_client.go 1KB
create.go 824B
共 197 条
- 1
- 2
止蚀
- 粉丝: 22
- 资源: 4508
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Picasso_v3.1 2.ipa
- chromedriver-mac-arm64.zip
- 蓝zapro.apk
- chromedriver-linux64.zip
- UCAS研一深度学习实验-MNIST手写数字识别python源码+详细注释(高分项目)
- 基于Python和PyTorch框架完成的一个手写数字识别实验源码(带MINIST手写数字数据集)+详细注释(高分项目)
- 基于Matlab在MNIST数据集上利用CNN完成手写体数字识别任务,并实现单层CNN反向传播算法+源代码+文档说明(高分项目)
- NVIDIA驱动、CUDA和Pytorch及其依赖
- 基于SVM多特征融合的微表情识别python源码+项目说明+详细注释(高分课程设计)
- html动态爱心代码一(附源码)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1