QCon北京2018/QCon北京2018-基于Kubernetes与Helm的应用部署平台构建实践-张夏-赵明+
基于Kubernetes和Helm的应用部署 平台构建实践 演讲者: 张夏 赵明� FreeWheel� 演讲大纲 • 基于Kubernetes平台概览与架构 • 基于Kubernetes的应用部署最佳实践� • 服务在混合云上的部署架构与演示 • 基于Consul的混合云服务发现与演示 • 应用在混合云上的端到端测试方案 • 后续工作展望 公司与项目背景介绍 ����������������� ������������� • IaaS:AWS、OpenStack与物理机 • PaaS:基于Kubernetes私有云平台, 支持CI/CD、配置管理、基于Helm的 服务编排等 基于Kubernetes平台概览 Kubernetes on AWS高可用架构 • 高可用性 • 容灾容错 • 监控报警 • 日志收集 • 轻量级框架 并通过RabbitMQ消息传输� • 通过uWSGI配合Nginx反向代理实现 更好的性能 • 使用Helm进行复杂容器编排 基于Kubernetes平台技术架构 基于Kubernetes的应用部署最佳实践 • 构建Docker镜像最佳实践 • 基于Helm的应用模板抽象 • 基于Kubernetes的 CI/CD� 构建Docker镜像最佳实践 预期 ������0 码力 | 28 页 | 12.18 MB | 1 年前3K8S安装部署开放服务
--key=tls.key K. 安装 helm3 wget https://get.helm.sh/helm-v3.3.4-linux-amd64.tar.gz tar xvf helm-v3.3.4-linux-amd64.tar.gz cp linux-amd64/helm /usr/local/bin/ helm version helm repo add stable http://mirror azure.cn/kubernetes/charts helm repo add aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts helm repo list L. Helm 安装 emqx 集群 Step1. 下载 emqx helm chart helm repo add emqx https://repos https://repos.emqx.io/charts helm search repo emqx helm fetch emqx/emqx tar xvf emqx-4.2.0.tgz Step2. 修改 StatefulSet.yaml vi emqx/templates/StatefulSet.yaml spec: volumes: - name:0 码力 | 54 页 | 1.23 MB | 1 年前3k8s操作手册 2.3
★第0章、K8S集群搭建准备工作 相关单词原义: docker 码头工人 pod 集装箱 kubernetes 舵手,领航员 helm 舵轮,驾驶盘 chart 图表,海图 ①k8s对系统要求 linux内核在3.10及以上,服务器规格2核cpu,2G内存及以上,可以装在虚拟机 ★第14章、Helm包管理 helm就是k8s的应用程序包管理器,helm将k8s应用的相关资源配置文件组织为 Charts Charts就是一个helm程序包, ★安装helm ①helm v3 ★Helm v3不再使用�ller,直接使用helm命令即可 helm开源地址: h�ps://github.com/helm/helm 下载压缩包到linux服务器上, 下载压缩包到linux服务器上,并解压,把解压目录下的helm可执行文件复制 到/usr/bin/目录下添加可执行权限即可 helm和kubectl一样默认读取$HOME/.kube/config配置文件去获取操作k8s集群的 权限 ②helm v2 helm v2需要使用�ller,运行于k8s集群上,需要使用一个ServiceAccount # vi �ller-cluster-admin.yaml0 码力 | 126 页 | 4.33 MB | 1 年前3Kubernetes 容器编排与应用编排
Registry - Helm Registry Helm Chart Helm Registry 1. 负责存储和管理用户的 Charts |- space |- chart |- version 2. 可选的多种存储后端(FileSystem,OSS,…) 3. 可通过 API 直接对应用进行编排 4. 开源(https://github.com/caicloud/helm-registry) ry) 应用编排架构 Application Manager - Helm Tiller Helm Tiller 1. 负责将 Chart 部署到指定的集群当中,并管理生成的 Release(应用) 2. 支持对 Release 的 更新,删除,回滚 操作 3. 支持对 Release 的资源进行增量更新 4. Release 的状态管理 5. Kubernetes 下属子项目(https://github com/kubernetes/helm) 应用编排架构 多集群架构 Kubernetes Cluster Development Helm Tiller Application Application … Kubernetes Cluster Production Helm Tiller Application Application … Application API Helm Registry0 码力 | 20 页 | 4.22 MB | 1 年前3Apache OpenWhisk + Kubernetes: A Perfect Match for Your Serverless Platform
在Pod的基础概念之上的。 § 用户可以通过kubectl配合描述资源的yaml文件 创建这些资源 Helm • The package manager for Kubernetes • Easy to create, version, share, and publish — so start using Helm and stop the copy- and-paste madness. • community: https://helm.sh/ Core concepts in Helm Helm installs charts into Kubernetes, creating a new release for each installation. And to find new charts, you can search Helm chart repositories execute user actions 3. Create a mycluster.yaml file to customize the deployment 4. Deploy with Helm 5. Wait…and done0 码力 | 24 页 | 3.53 MB | 1 年前3A Day in the Life of a Data Scientist Conquer Machine Learning Lifecycle on Kubernetes
workflow and some of their shortcomings • Why DevOps? • Why Containers, Kubernetes, and Helm? • Intro to Kubeflow, Helm, Argo • Demos • Image classification with Inception v3 and transfer learning • Automate containers • Deploy ML components to Kubernetes with Kubeflow • Scale and test ML experiments with Helm • Manage training jobs and pipelines with Argo • Serve trained models for inference with TF Serving AI/ML • But, must ensure data scientist are not hindered by structure Why Containers, Kubernetes & Helm? • Container • Contains everything needed to run your application • Build once run anywhere •0 码力 | 21 页 | 68.69 MB | 1 年前3全球架构师峰会2019北京/云原生/阿里巴巴 Kubernetes 应用管理实践中的经验与教训&mdash
被同时安装给了同一个应用 • K8s 扩展能力之间的冲突关系,如何有效管理?如何有效的对运维透出? K8s 如何管理描述云资源? 太好了,我还需要启动一个 RDS, 能跟 helm一起打包吗? Operator 写好了,用 helm 打包部署吧,美滋滋.. 这样啊,你们PaaS 平台的 体验好割裂… 好吧,我们试试 …… 这你恐怕得单独去RDS 界面创建… 业务方运维 K8s 团队 CRD Promethus Operator Elasticsearch Operator database Component OpenKruise RDS operator …… • OAM • Helm/CNAB • GitOps • Rollout • Workload Controller • K8s Operators • Kubernetes • FaaS • Cloud Services0 码力 | 26 页 | 6.91 MB | 1 年前3Kubernetes Native DevOps Practice
Deployment Upgrade an existing service Deploy using helm template environment variables • Image with kubectl or call k8s API • Image with helm client • Call Spinnaker webhook Job Kubernetes Cluster Cluster Kubernetes Cluster Pod Pod Pod Pod - Rolling Upgrade / Recreate - Deploy / Upgrade using helm,rollback if unready pods - Check tracing data, rollback if get unexpected failure rate - Call0 码力 | 21 页 | 6.39 MB | 1 年前3基于 KUBERNETES 的 容器器 + AI 平台
运⾏行行和构建应⽤用 跑在 KUBERNETES 上的应⽤用 • k8s 基础资源之外 • 资源分组和整体状态 • 重⽤用 YAML 配置 • 版本化 • 启动依赖 • Helm 很棒,但是 …… 典型企业应⽤用的架构 CAICLOUD/RUDDER • 2 CRDs - Release, Release History • 1 控制器器 - Rudder aka https://github.com/caicloud/canary-release • https://github.com/caicloud/charts • https://github.com/caicloud/helm-registry Rudder 技术架构 ⼀一套基于 k8s 控制器器模式的原⽣生的应⽤用管理理 和编排运⾏行行时 安全性与扩展性:从 k8s 原⽣生模式中获益 状态可读:跟踪所有 k8s0 码力 | 19 页 | 3.55 MB | 1 年前3涂小刚-基于k8s的微服务实践
施 自动恢复 监 控 报 警 harbor 容 器 引 擎 存 储 管 理 编 译 发 布 软件定义网络跨节点通讯 统 一 集 中 运 营 管 理 gitlab jenkins helm ceph nfs prometheus filebeat elastsearch flanneld calico openstack kvm docker 镜 像 管 理 弹性伸缩 app2.ai-test.svc.cluster.local jnlp-slave-1 pod jnlp-slave-2 pod jnlp-slave-* pod maven node helm kubectl java k8s node 容器 harbor pod1 pod2 pod3 pod*** push images pull code k8s cluster0 码力 | 19 页 | 1.34 MB | 1 年前3
共 19 条
- 1
- 2