Git Product home page Git Product logo

localkube's Introduction

快速安装一个k8s集群

要求

  • 安装节点有docker 运行环境
  • k8s集群master和node节点操作系统为centos7

k8s_env.png

简介

镜像地址 registry.cn-hangzhou.aliyuncs.com/chenhuazhong/localkube
该项目验证通过 k8s v1.20.7版本安装,网络插件为 flannel
已把安装过程中需要下载的kubeadm、kubectl、kubelet等文件保存到镜像中。安装过程中需要的其他容器镜像已经上传到阿里云
该项目是基于 开源项目 kubespray改造。只用与学习目的快速搭建k8s集群。搭建生产可用集群请参考原项目。

安装步骤

  • 拉取镜像
docker pull registry.cn-hangzhou.aliyuncs.com/chenhuazhong/localkube:v1
  • 启动容器
docker run -it  registry.cn-hangzhou.aliyuncs.com/chenhuazhong/localkube:v1 bash
  • 编辑主机清单
vim ./inventory/sample/inventory.ini
  • 初始化各个节点
ansible-playbook -i inventory/sample/inventory.ini initlinux.yaml
该步骤执行中会重启主机清单中的主机
  • 安装k8s集群
ansible-playbook -i inventory/sample/inventory.ini cluster.yml

localkube's People

Contributors

chenhuazhong 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.