Git Product home page Git Product logo

kops-cn's Introduction

English README

免责说明

建议测试过程中使用此方案,生产环境使用请自行考虑评估。
当您对方案需要进一步的沟通和反馈后,可以联系 [email protected] 获得更进一步的支持。
欢迎联系参与方案共建和提交方案需求, 也欢迎在 github 项目issue中留言反馈bugs。

kops-cn项目介绍

本项目用于指导客户使用开源自动化部署工具Kops在AWS宁夏区域或北京区域搭建K8S集群。 本项目已经将K8S集群搭建过程中需要拉取的镜像或文件拉回国内,因此您无需任何翻墙设置。

特性

  • 集群创建过程中所需的docker镜像已存放在 宁夏北京 区域的Amazon ECR中。
  • 集群创建过程中所需的二进制文件或配置文件已存放在 北京 区域的Amazon S3桶中 。
  • 简单快速的集群搭建和部署
  • 无需任何VPN代理或翻墙设置
  • 如有新的Docker镜像拉取需求,您可以创建Github push or pull request,您的request会触发CodeBuild(buildspec.yml) 去拉取镜像并存放到AWS cn-north-1 的ECR中。查看: 镜像列表.

步骤

  1. 下载项目到本地
$ curl  https://github.com/nwcdlabs/kops-cn/archive/master.zip -L -o kops-cn.zip
$ unzip kops-cn
$ cd kops-cn-master
  1. 在本机安装kops and kubectl命令行客户端: 安装指导

您也可以直接从以下链接的AWS**区域的S3桶中下载 kops and kubectl 的二进制文件:

//kops for linux
https://s3.cn-north-1.amazonaws.com.cn/kops-bjs/fileRepository/kops/1.11.0/linux/amd64/kops
//kops for mac os
https://s3.cn-north-1.amazonaws.com.cn/kops-bjs/fileRepository/kops/1.11.0/darwin/amd64/kops
//kubectl for linux
https://s3.cn-north-1.amazonaws.com.cn/kops-bjs/fileRepository/kubernetes-release/release/v1.11.6/bin/linux/amd64/kubectl
//kubectl for mac os
https://s3.cn-north-1.amazonaws.com.cn/kops-bjs/fileRepository/kubernetes-release/release/v1.11.6/bin/darwin/amd64/kubectl
  1. 编辑 env.config文件. 您需要设置如下变量
Name Description values
TARGET_REGION 选择将集群部署在aws北京或宁夏区域 cn-north-1 or cn-northwest-1
KOPS_STATE_STORE 您需要提供一个S3桶给KOPS存放配置信息 s3://YOUR_S3_BUCKET_NAME
vpcid 选择将您的集群部署在哪个VPC中 vpc-xxxxxxxx
ssh_public_key 本地ssh公钥的存放路径 ~/.ssh/id_rsa.pub [default]
  1. 创建集群
// 如果客户端存在多个aws profile,需要将**区域profile明确的export出来:
$ export AWS_PROFILE=bjs
$ source env.config
$ bash create-cluster.sh
  1. 编辑集群
kops edit cluster $cluster_name

spec.yml 中内容贴到spec 下并保存退出。

  1. 更新集群
kops update cluster $cluster_name --yes
  1. 完成

验证

集群的创建大概需要 3-5 分钟时间。之后,使用 kops validate cluster 来验证集群是否是 ready状态。

查看集群对外接口信息、版本信息

恭喜您已顺利完成!

插件安装

FAQ

集群验证失败?

查看 issue #5

如何SSH上master节点和worker节点 ?

查看 issue #6

我需要的docker镜像在ECR中不存在.

aws北京区域ECR中的镜像仓库containerRegistry 中的已有镜像见required-images.txt, 如您在集群创建过程中需要其他镜像, 请您编辑 required-images.txt ,这将会在您的GitHub账户中 fork 一个新的分支,之后您可以提交PR(pull request)。 Merge您的PR会触发CodeBuild 去拉取 required-images.txt 中定义的镜像回ECR库。 数分钟后,您可以看到图标从in-progress变为

查看所有FAQs 这里

kops-cn's People

Contributors

pahud avatar seimutig avatar yujunz avatar sunfuze avatar bigdrum avatar satchinjoshi avatar alyanli avatar jansony1 avatar walkley avatar xmubeta 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.