Giter Site home page Giter Site logo

ansible-install-k8s's Introduction

Kubernetes v1.16 高可用集群自动部署(离线版)

确保所有节点系统时间一致

1、下载所需文件

下载Ansible部署文件:

# git clone https://github.com/lizhenliang/ansible-install-k8s
# cd ansible-install-k8s

下载软件包并解压/root目录:

云盘地址:https://pan.baidu.com/s/1lTXolmlcCJbei9HY2BJRPQ

# tar zxf binary_pkg.tar.gz

2、修改Ansible文件

修改hosts文件,根据规划修改对应IP和名称。

# vi hosts
...

修改group_vars/all.yml文件,修改软件包目录和证书可信任IP。

# vim group_vars/all.yml
software_dir: '/root/binary_pkg'
...
cert_hosts:
  k8s:
  etcd:

3、一键部署

架构图

单Master架构 avatar 多Master架构 avatar

部署命令

单Master版:

# ansible-playbook -i hosts single-master-deploy.yml -uroot -k

多Master版:

# ansible-playbook -i hosts multi-master-deploy.yml -uroot -k

4、部署控制

如果安装某个阶段失败,可针对性测试.

例如:只运行部署插件

# ansible-playbook -i hosts single-master-deploy.yml -uroot -k --tags addons

avatar

ansible-install-k8s's People

Contributors

lizhenliang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.