• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

kube-ansible: Deploy kubernetes binaries with ansible

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

kube-ansible

开源软件地址:

https://gitee.com/buxiaomo/kube-ansible

开源软件介绍:

kube-ansible

This project will used ansible to deployment kubernetes.

Read the documentation to see how the project is used

then return here.

Cloud Support

  • Raspberry Pi
  • Azure
  • Aliyun (no test)
  • Aws (APIServer HA use the CLB)
  • GCP (APIServer HA use the TCP Load balancing)

Architecture Support

  • aarch64 (only download from official)
  • x86_64

OS Support

All node please install python3.

  • CentOS 7.*
  • CentOS 8.*
  • Ubuntu 16.*
  • Ubuntu 18.*
  • Ubuntu 20.*
  • Debian 10.*

Version of the relationship

KubernetesEtcdDockerCNICoreDNSCalicocri-toolsmetrics-server
1.14.xv3.3.101.13.1, 17.03, 17.06, 17.09, 18.06, 18.09v0.7.5v1.3.1v3.3.1v1.12.0v0.3.1
1.15.xv3.3.101.13.1, 17.03, 17.06, 17.09, 18.06, 18.09v0.7.5v1.3.1v3.3.1v1.14.0v0.3.3
1.16.xv3.3.151.13.1, 17.03, 17.06, 17.09, 18.06, 18.09v0.7.5v1.6.2v3.3.1v1.14.0v0.3.4
1.17.xv3.4.31.13.1, 17.03, 17.06, 17.09, 18.06, 18.09v0.7.5v1.6.2v3.3.1v1.14.0v0.3.4
1.18.xv3.4.31.13.1, 17.03, 17.06, 17.09, 18.06, 18.09v0.8.5v1.6.7v3.8.4v1.17.0v0.3.4
1.19.xv3.4.91.13.1, 17.03, 17.06, 17.09, 18.06, 18.09v0.8.6v1.6.7v3.8.4v1.17.0v0.3.4
1.20.xv3.4.131.13.1, 17.03, 17.06, 17.09, 18.06, 18.09v0.8.7v1.6.7v3.8.4v1.19.0v0.3.4
1.21.xv3.4.131.13.1, 17.03, 17.06, 17.09, 18.06, 18.09v0.8.7v1.6.7v3.8.4v1.20.0v0.3.4
1.22.xv3.5.01.13.1, 17.03, 17.06, 17.09, 18.06, 18.09v0.9.1v1.3.1v3.19.1v1.21.0v0.4.4
1.23.xv3.5.01.13.1, 17.03, 17.06, 17.09, 18.06, 18.09v0.9.1v1.3.1v3.19.1v1.22.0v0.4.4

How to use

Preparation work

Clone code

Gitee: https://gitee.com/buxiaomo/kube-ansible.git

Gitlab: https://gitlab.com/buxiaomo/kube-ansible.git

Github: https://github.com/buxiaomo/kube-ansible.git

# ubuntuapt-get updateapt-get install git make -y# centosyum install git make vim -y# clone codegit clone https://github.com/buxiaomo/kube-ansible.git /usr/local/src/kube-ansiblecd /usr/local/src/kube-ansible

Install ansible

if python3 not install on other node, please run command ansible-playbook fix-python3.yml or curl -s https://bootstrap.pypa.io/pip/get-pip.py | python3.

make runtime

Download the way

  • nexus

    if you don't have internet, you can run make nexus NEXUS_DOMAIN_NAME=http://<url> NEXUS_REPOSITORY=<repository name> NEXUS_HTTP_USERNAME=<username> NEXUS_HTTP_PASSWORD=<password> script on internet virtual machine and upload to nexus.

  • official

    It will be download from Github or Google

about Makefile parameter

ParameterdescribeDefaultoption
PKI_URLPKI Server, about pki server, you can reference hereN/Apki server url
PROJECT_NAMEProject Namekube-ansibleused by pki server
PROJECT_ENVProject Envdevused by pki server
IP_STACKKubernetes IP Stackipv4ipv4 or ipv6
DOWNLOAD_WAYBinary download modeofficialofficial or nexus
RUNTIMEcontainer runtimedockerdocker or containerd
CONTAINERD_VERSIONcontainerd binary versionlatestN/A
CRICTL_VERSIONcrictl binary versionlatestN/A
RUNC_VERSIONrunc binary versionlatestN/A
KUBE_VERSIONKubernetes binary versionlatestN/A
DOCKER_VERSIONDocker binary versionlatestN/A
ETCD_VERSIONEtcd binary versionlatestN/A
CNI_VERSIONCNI binary versionlatestN/A
NEXUS_USERNAMENexus usernameN/AN/A
NEXUS_PASSWORDNexus passwordN/AN/A
NEXUS_DOMAIN_NAMENexus domain nameN/AN/A
NEXUS_REPOSITORYNexus repository namekube-ansibleN/A
Download the default version using official
# 1.13make deploy DOWNLOAD_WAY=official KUBE_VERSION=1.13.12 ETCD_VERSION=3.2.24 CNI_VERSION=0.6.0 DOCKER_VERSION=18.09.0# 1.14make deploy DOWNLOAD_WAY=official KUBE_VERSION=1.14.10 ETCD_VERSION=3.3.10 CNI_VERSION=0.7.5 DOCKER_VERSION=18.09.0# 1.15make deploy DOWNLOAD_WAY=official KUBE_VERSION=1.15.12 ETCD_VERSION=3.3.10 CNI_VERSION=0.7.5 DOCKER_VERSION=18.09.0# 1.16make deploy DOWNLOAD_WAY=official KUBE_VERSION=1.16.15 ETCD_VERSION=3.3.15 CNI_VERSION=0.7.5 DOCKER_VERSION=18.09.0# 1.17make deploy DOWNLOAD_WAY=official KUBE_VERSION=1.17.17 ETCD_VERSION=3.4.3 CNI_VERSION=0.7.5 DOCKER_VERSION=18.09.0# 1.18make deploy DOWNLOAD_WAY=official KUBE_VERSION=1.18.20 ETCD_VERSION=3.4.3 CNI_VERSION=0.8.5 DOCKER_VERSION=18.09.0# 1.19make deploy DOWNLOAD_WAY=official KUBE_VERSION=1.19.16 ETCD_VERSION=3.4.9 CNI_VERSION=0.8.6 DOCKER_VERSION=18.09.0# 1.20make deploy DOWNLOAD_WAY=official KUBE_VERSION=1.20.15 ETCD_VERSION=3.4.13 CNI_VERSION=0.8.7 DOCKER_VERSION=18.09.0# 1.21make deploy DOWNLOAD_WAY=official KUBE_VERSION=1.21.10 ETCD_VERSION=3.4.13 CNI_VERSION=0.8.7 DOCKER_VERSION=18.09.0# 1.22make deploy DOWNLOAD_WAY=official KUBE_VERSION=1.22.7 ETCD_VERSION=3.5.0 CNI_VERSION=0.9.1 DOCKER_VERSION=18.09.0# 1.23make deploy DOWNLOAD_WAY=official KUBE_VERSION=1.23.4 ETCD_VERSION=3.5.0 CNI_VERSION=0.9.1 DOCKER_VERSION=18.09.0
Download the default version using Nexus

asciicast

pip3 install requests./scripts/upload-to-nexus.py --url http://nexus.example.com \--repository kube-ansible --username admin --password admin123 \--docker 20.10.12 \--etcd 3.5.2 \--kubernetes 1.23.4 \--cni 1.1.0 \--containerd 1.6.0 \--runc 1.1.0 \--crictl 1.23.0make deploy DOWNLOAD_WAY=nexus \NEXUS_DOMAIN_NAME=http://nexus.example.com \NEXUS_REPOSITORY=kube-ansible \NEXUS_USERNAME=admin \NEXUS_PASSWORD=admin123

Kubernetes management

Deploy

ca save to deployment server

asciicast

# default version## docker runtimemake deploy DOWNLOAD_WAY=official RUNTIME=docker## containerd runtimemake deploy DOWNLOAD_WAY=official RUNTIME=containerd# custom version## docker runtimemake deploy DOWNLOAD_WAY=official \RUNTIME=docker \KUBE_VERSION=1.14.4 \DOCKER_VERSION=19.03.8 \ETCD_VERSION=3.4.5## containerd runtimemake deploy DOWNLOAD_WAY=official \RUNTIME=containerd \KUBE_VERSION=1.14.4 \DOCKER_VERSION=19.03.8 \ETCD_VERSION=3.4.5
ca use to PKI server

about pki server, you can reference here

make deploy DOWNLOAD_WAY=official \PKI_URL=http://pki.example.com/v1/pki/projectPROJECT_NAME=demoPROJECT_ENV=dev

Scale

asciicast

# default versionmake scale# custom versionmake scale KUBE_VERSION=1.16.8 DOCKER_VERSION=19.03.8 FLANNEL_VERSION=0.12.0 ETCD_VERSION=3.4.5

Upgrade

Download new kubernetes binaries, Reference here.

make upgrade KUBE_VERSION=1.18.5

Kubernetes Extended application

This repo only deploy a kubernetes cluster and core application like 'coredns', 'calico', 'canal', 'flannel', not support extended application, like 'jenkins', 'ingress'...

if you want to deploy extended application, please reference here.

Known Issues

  • error: Following Cgroup subsystem not mounted: [memory], see here

knowledge


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap