当前位置: 首页 > 软件库 > 云计算 > 云原生 >

kubernetes-on-aws

授权协议 MIT License
开发语言 Google Go
所属分类 云计算、 云原生
软件类型 开源软件
地区 不详
投 递 者 戎高爽
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Kubernetes on AWS

WORK IN PROGRESS

This repo contains configuration templates to provision Kubernetes clusters on AWS using Cloud Formation and Ubuntu Linux.

Many values are parameterized and values are not always visible. We're focusing on solving our own, specific/Zalando use case.However, we are open to ideas from the community at large about potentially turning this idea into a project that provides universal/general value to others.Please contact us via our Issues Tracker with your thoughts and suggestions.

Configuration in this repository initially was based on kube-aws, but now depends on four components which aren't all yet open sourced:

  • Cluster Registry to keep desired cluster states (e.g. used config channel and version)
  • Cluster Lifecycle Manager to provision the cluster's Cloud Formation stack and apply Kubernetes manifests for system components
  • Cluster Lifecycle Controller that handles rolling updates from inside the cluster, for example node termination
  • Authnz Webhook to validate OAuth tokens and authorize access

Lean more about Zalando's cloud native journey by reading the Zalando Case Study on kubernetes.io.See our Running Kubernetes in Production on AWS document for details on the setup.

Features

  • Highly available master nodes (ASG) behind ELB
  • Worker Auto Scaling Group with node pools support
  • Flannel overlay networking
  • Cluster autoscaling (using cluster-autoscaler)
  • Kubernetes DNS with node-local dnsmasq as daemonset and CoreDNS resolver for cluster.local domain running in the same pod.
  • Route53 DNS integration via External DNS
  • AWS IAM integration via kube2iam, AWS OIDC IAM
  • Standard components are installed: dashboard, node exporter, kube-state-metrics, see also cluster/manifests directory
  • Webhook authentication and authorization (roles "ReadOnly", "PowerUser", "Manual", "Emergency", "Administrator")
  • Emergency Access via internal emergency-access-service, that grant roles "Manual" and "Emergency" with 4 eyes principle and audit logging
  • Log shipping via Scalyr
  • Full Ingress support with ALB/NLB and TLS integration via kube-ingress-aws-controller and HTTP routing via skipper
  • Enhanced usability with managed stacks and blue green deployments via stackset-controller and skipper
  • Fabric API Gateway, which can be used in combination with stackset-controller
  • Static Egress IPs to route through NAT Gateways with Elastic IPs via kube-static-egress-controller
  • Horizontal Pod Autoscaling with scaling by request per second, SQS queue size or others via kube-metrics-adapter
  • Vertical Pod Autoscaling to scale for example Prometheus
  • EFS support
  • GPU support
  • ETCD backup via Kubernetes cronjob and etcdctl snapshot and upload to S3
  • Monitoring via Prometheus and OpenTracing
  • Fully automated cluster updates via Cluster Lifecycle Manager
  • Automated downscaling for test clusters with kube-downscaler
  • Fallback node pools
  • Spot node pool integration
  • automated PDB creation with pdb-controller

Notes

  • Node and user authentication is done via tokens (using the webhook feature)
  • SSL client-cert authentication is disabled
  • Many values are hardcoded
  • Secrets (e.g. shared token) are not KMS-encrypted in the cluster

Assumptions

  • The AWS account has one or more hosted zones in Route53 including a proper SSL cert (you can use the free ACM service)
  • The VPC has at least one public subnet per AZ (either AWS default VPC setup or public subnet named "dmz-<REGION>-<AZ>")
  • The VPC is in region eu-central-1 or eu-west-1
  • etcd cluster is available via DNS discovery (SRV records) at etcd.<YOUR-HOSTED-ZONE>
  • OAuth Token Info is available to validate user tokens

Directory Structure

  • cluster/cluster.yaml: Cloud Formation template files for the cluster (will be applied by Cluster Lifecycle Manager)
  • cluster/config-defaults.yaml: Default values for different kind of use that can be overriden by values from our cluster-registry (will be applied by Cluster Lifecycle Manager)
  • cluster/etcd-cluster.yaml: Senza Cloud Formation to deploy ETCD
  • cluster/manifests: Kubernetes manifests for system components (will be applied by Cluster Lifecycle Manager)
  • cluster/node-pools: Cloud Formation template files and userdata (cloud-init) for ContainerLinux node-pools (will be applied by Cluster Lifecycle Manager)
  • docs: extracts from internal Zalando documentation.
  • ---yum repo baseurl=http://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/ baseurl=http://mirrors.aliyun.com/docker-ce/linux/centos/7/x86_64/stable/ baseurl=http://mirrors.aliyun.com/ep

  • 存储卷   Pod是有生命周期的,当Pod出现故障时,数据会随着Pod的终结就结束了.   针对K8s集群,我们应该使用脱离节点的存储设备,共享存储设备.   如果使用docker持久化数据的那种方法,那么Pod重构后就不能更换节点,否则,挂载的目录位置肯定就访问不到了. 可用存储卷:   1. emptyDir: 临时存储目录,随着Pod删除也会被删除.   2. hostPath: 节点路径,

  • Helm 介绍 Helm可帮助您管理Kubernetes应用程序 - Helm Charts可帮助您定义,安装和升级最复杂的Kubernetes应用程序。与ubuntu下的apt, centos下的yum类似的管理工具。 kubernetes在创建资源时使用yaml形式存储,随着资源复杂度增加,yaml中的内容也越来越多,helm chart通过管理包的形式将资源数据分散在不同文件中。 helm

 相关资料
  • Gitea provides a Helm Chart to allow for installation on kubernetes. A non-customized install can be done with: helm repo add gitea-charts https://dl.gitea.io/charts/ helm install gitea gitea-charts/g

  • 该项目是基于 Spark standalone 模式,对资源的分配调度还有作业状态查询的功能实在有限,对于让 spark 使用真正原生的 kubernetes 资源调度推荐大家尝试 https://github.com/apache-spark-on-k8s/ 本文中使用的镜像我已编译好上传到了时速云上,大家可以直接下载。 index.tenxcloud.com/jimmy/spark:1.5.2

  • Lab: Build a Continuous Deployment Pipeline with Jenkins and Kubernetes For a more in depth best practices guide, go to the solution posted here. Introduction This guide will take you through the step

  • Kubernetes The Hard Way on Azure This tutorial is designed for Microsoft Azure and Azure CLI 2.0.It is a fork of the great Kubernetes The Hard Way from Kelsey Hightower that describes same steps using

  • on

    描述 (Description) 它将事件绑定到对象和回调函数。 每当触发事件时,它都会执行回调。 语法 (Syntax) object.on(event, callback function, [context]) 参数 (Parameters) event - 它绑定一个对象。 callback - 它是对代码的引用。 context - 它是一个可以传递给回调函数的对象。 例子 (Exam

  • cPanel的这个接口允许您创建和安装Ruby on Rails应用程序。 如果您开发了Ruby on Rails应用程序,则可以使用此界面将其部署到服务器。 要创建Ruby on Rails应用程序,请按照下列步骤操作 - Step 1 - 单击cPanel Home的Software Section下的Ruby on Rails。 Step 2 - 在Ruby on Rails接口中,您将找到