[k8s cluster] construction steps

This coke is a little sweet 2021-02-23 16:01:15
k8s cluster construction steps

because k8s Plan in v1.20 After that docker( When the container is running , Instead of docker Containers ), Therefore, it is planned to adopt containerd When running as a container .

One 、 install containerd and crictl

1.1 A term is used to explain
runc: according to OCI Specification to build and run the container's command line tools .
containerd: Container runtime
crictl:k8s Command line tools for

1.2 Installation steps

# 1. install runc
curl -OL https://github.com/opencontainers/runc/releases/download/v1.0.0-rc92/runc.amd64
mv runc.amd64 /usr/local/bin/runc && chmod +x /usr/local/bin/runc
# 2. install containerd
curl -OL https://github.com/containerd/containerd/releases/download/v1.4.3/containerd-1.4.3-linux-amd64.tar.gz
tar -zxvf containerd-1.4.3-linux-amd64.tar.gz -C /usr/local
curl -o /etc/systemd/system/containerd.service https://raw.githubusercontent.com/containerd/cri/master/contrib/systemd-units/containerd.service
# 3. To configure containerd
mkdir -p /etc/containerd
cat > /etc/containerd/config.toml << EOF
sandbox_image = "kubesphere/pause:3.2"
endpoint = ["https://registry-1.docker.io"] ## It can be replaced by dockerhub The mirror accelerator of
systemctl enable containerd && systemctl restart containerd
# 4. install crictl
curl -OL https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-$VERSION-linux-amd64.tar.gz
sudo tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin
rm -f crictl-$VERSION-linux-amd64.tar.gz
# 5. To configure crictl
cat > /etc/crictl.yaml << EOF
runtime-endpoint: unix:///run/containerd/containerd.sock
image-endpoint: unix:///run/containerd/containerd.sock
timeout: 2
debug: false
pull-image-on-create: false

Two 、 Deploy k8s and kubesphere

# 1. download kubekey
## For the time being kubekey v1.1.0-alpha.1 Deploy kubernetes colony , This is a preview version , Support more container-runtime It will also be included in subsequent official versions .
curl -OL https://github.com/kubesphere/kubekey/releases/download/v1.1.0-alpha.1/kubekey-v1.1.0-alpha.1-linux-amd64.tar.gz
tar -zxvf kubekey-v1.1.0-alpha.1-linux-amd64.tar.gz
# 2. create profile
./kk create config # It is generated in the same level directory by default config-sample.yaml
# 3. Modify the configuration file according to the real environment information
vi config-sample.yaml
apiVersion: kubekey.kubesphere.io/v1alpha1
kind: Cluster
name: sample
- {name: node1, address:, internalAddress:, password: xxx}
- {name: node2, address:, internalAddress:, password: xxx}
- node1
- node1
- node1
- node2
domain: lb.kubesphere.local
address: ""
port: 6443
version: v1.17.9
imageRepo: kubesphere
clusterName: cluster.local
containerManager: containerd ## Fill in the previously deployed container-runtime:containerd / crio / isula
plugin: calico
registryMirrors: []
insecureRegistries: []
addons: []
# 4. Deployment cluster
./kk create cluster -f config-sample.yaml --with-kubesphere
# 5. Wait for cluster deployment to complete 

notes :kubesphere The default account password is admin/P@88w0rd

Reference link :https://kubesphere.com.cn/for...

本文为[This coke is a little sweet]所创,转载请带上原文链接,感谢

  1. Spring can still play like this! Ali's new spring product has successfully overturned my understanding of spring!
  2. IntelliJ idea can also draw mind maps. It's really the strongest ide!
  3. JavaScript performance optimization [inline cache] V8 engine features
  4. linux 配置java环境
  5. linux find 查找文件
  6. 深入理解 Web 协议 (三):HTTP 2
  7. IntelliJ IDEA 相关问题记录
  8. Deep understanding of Web protocol (3): http 2
  9. 深入理解 Web 协议 (三):HTTP 2
  10. 腾讯IEG开源AI SDK:自动化测试吃鸡、MOBA类游戏
  11. Mysql Command
  12. Configuring Java environment with Linux
  13. Find files in Linux
  14. docker-Dockerfile 创建镜像
  15. Redis Cluster
  16. 深入理解 Web 协议 (三):HTTP 2
  17. JavaScriptBOM操作
  18. JavaScriptBOM操作
  19. Deep understanding of Web protocol (3): http 2
  20. Record of IntelliJ idea related problems
  21. Deep understanding of Web protocol (3): http 2
  22. Tencent IEG open source AI SDK: automatic testing of chicken eating and MoBa games
  23. Mysql Command
  24. Docker dockerfile create image
  25. Redis Cluster
  26. 死磕Spring之IoC篇 - 文章导读
  27. Deep understanding of Web protocol (3): http 2
  28. JavaScript BOM operation
  29. JavaScript BOM operation
  30. 死磕Spring之IoC篇 - 文章导读
  31. k8s node 操作与维护
  32. k8s 证书更新
  33. 【Java面试题第三期】JVM中哪些地方会出现内存溢出?出现的原因是什么?
  34. HashMap连环问你能答出几道?
  35. k8s-cronjob
  36. k8s-cert
  37. 头条面试官:说说Kafka的消费者提交方式,怎么实现的
  38. 什么是HTTPS以及如何实施HTTPS?
  39. Spring: an introduction to IOC
  40. Spring: an introduction to IOC
  41. Operation and maintenance of k8s node
  42. K8s certificate update
  43. vue使用sdk进行七牛上传
  44. k8s-dns
  45. JavaScript 邮箱验证 - 正则验证
  46. k8s-dashboard
  47. HashMap连环问你能答出几道?
  48. Where does memory overflow occur in the JVM? What are the reasons for this?
  49. How many questions can you answer?
  50. k8s-cronjob
  51. spring注解--Transactional
  52. k8s-cert
  53. Will the Spring Festival holiday be extended to February 27 in 2021? Here comes the response
  54. Headline Interviewer: talk about Kafka's consumer submission method, how to achieve it
  55. 【k8s集群】搭建步骤
  56. k8s-kubeadm
  57. k8s-etcd
  58. What is HTTPS and how to implement it?
  59. Java中使用HashMap改进查找性能
  60. maven发布jar包运行时找不到类问题