k0s 号称是一款简易、稳定且经过认证的 Kubernetes 发行版,它提供了构建 Kubernetes 集群所需的所有内容,预先配置了所有所需的功能,使得构建 Kubernetes 集群只需复制一个可执行文件到每个主机并运行它即可。
环境准备
- centos7 4g
k0s
- 下载资源
k0s-v0.8.1-amd64 - 配置安装位置
mv k0s-v0.8.1-amd64 /usr/local/sbin/k0s chmod +x /usr/local/sbin/k0s
安装kubectl命令
配置k0s
```
mkdir -p ${HOME}/.k0s
k0s default-config | tee ${HOME}/.k0s/k0s.yaml
cat /var/lib/k0s/pki/admin.conf | tee ~/.k0s/kubeconfig
export KUBECONFIG="${HOME}/.k0s/kubeconfig"
```
启动程序
```
k0s server -c ${HOME}/.k0s/k0s.yaml --enable-worker &
```
查看运行状态
```
kubectl get pods --all-namespaces
```
出现问题
- failed to pull and unpack image "k8s.gcr.io/pause:3.2