Kubernetes On Azure
倪朋飞
Microsoft Azure
Kubernetes Maintainer
01
Azure 容器生态
Azure 容器生态
Azure 容器产品
IaaS
PaaS
Azure services
SQL Database
Redis Cache
CosmosDB
And more!
Partner services
OpenShift
Pivotal Cloud Foundry
Docker Enterprise Edition
Mesosphere �DC/OS
Azure
Azure Container Registry (ACR)
OSBA
Azure Kubernetes Service (AKS)
ACS Engine
Batch
Azure Container �Instances (ACI)
Azure Virtual Machines
Virtual Machine �Scale Sets (VMSS)
Service Fabric
Virtual kubelet
App Service
Azure Devops
Azure Kubernetes Service (AKS)
关注应用而不
是基础架构
放心缩放和运行
应用程序
完全开源的
Kubernetes
Azure Container Instance (ACI)
无需管理服务器
就可以运行容器
通过虚拟化保证
容器隔离
AKS 编排
按需弹性突发
Azure Container Registry (ACR)
支持各类容器镜像
和 Helm Charts
跨区域异地复制
自动构建
02
Azure 容器开源
容器开源 @Azure
Virtual Kubelet
ACS Engine
Kubernetes
2位Kubernetes指导
委员会成员
CNCF白金会员
Linux基金会成员
多位 SIG Lead
ACS Engine
尝试最新特性
自定义部署
开源
ACS Engine
ACS Engine 架构
云原生应用管理
云原生应用开发
部署工具
Kubernetes 应用包
管理部署工具
Kubernetes事件驱动
脚本引擎
Brigade 可视化界面
Open Service Broker
OpenShift
Cloud Foundry
Service Fabric (Coming soon)
Kubernetes�(AKS)
Azure SQL Database
Redis Cache
CosmosDB
And more!
Open Service Broker for Azure (OSBA)
Virtual Kubelet
ACI 无服务器容器
Virtual Kubelet 联结到一起
Kubernetes 编排调度
Virtual Kubelet
Kubernetes control pane
Application architect
Infrastructure architect
Azure Container Instances (ACI)
Virtual Kubelet
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
VM
VM
VM
VM
Deployment
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Waste
Waste
Waste
Waste
Visual Studio Code
03
Azure Kubernetes Service
Azure Kubernetes Service (AKS)
AKS
Azure 基础架构服务
Docker
Kubernetes
开发
运维
应用
运维
AKS 优势
特性 | AKS | Open Source |
Kubernetes 版本 | 完全一致 | |
集群管理 | 自动 (部署、故障恢复、自动扩展、升级…) | 专门团队运维 (且Node无法自动扩展) |
身份认证和访问控制 | 单点登录 (AAD、RBAC) | 开发额外组件 |
网络 | Azure VNET 集成 (Azure CNI) | 社区插件 (Flannel,Calico, …) |
存储 | AzureDisk, AzureFile… | 额外存储集群 |
日志和监控 | Azure Monitor (Application Insights, Log Analytics…) | 社区方案 (EFK, Prometheus, …) |
价格 | 按需付费,且控制平面免费 | 费用高 |
安全和合规性 | Azure安全团队保证 集群的安全性和合规性 | 专门团队运维 |
AKS 原理
API server
Controller Manager
Scheduler
etcd Store
Cloud Controller
Self-managed master node(s)
Customer VMs
App/ workload definition
User
Docker
Pods
Docker
Pods
Docker
Pods
Docker
Pods
Docker
Pods
Schedule pods over private tunnel
Kubernetes API endpoint
Azure managed control plane
AKS 示例 – 创建集群
$ az aks create -g resource-group –n myCluster --generate-ssh-keys --enable-rbac
\ Running ..
$ az aks install-cli
Downloading client to /usr/local/bin/kubectl ..
$ az aks get-credentials -g resource-group –n myCluster
Merged “myCluster” as current context ..
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
aks-nodepool1-42032720-0 Ready agent 1h v1.9.6
aks-nodepool1-42032720-1 Ready agent 1h v1.9.6
aks-nodepool1-42032720-2 Ready agent 1h v1.9.6
AKS示例 – 容器应用
$ kubectl create -f https://git.io/votingapp
deployment.apps/azure-vote-back created
service/azure-vote-back created
deployment.apps/azure-vote-front created
service/azure-vote-front created
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
azure-vote-back-746d4bc54b-rx8w6 1/1 Running 0 114s
azure-vote-front-f747b5d4b-rzbnp 1/1 Running 0 114s
$ kubectl get service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
azure-vote-back ClusterIP 10.0.60.54 <none> 6379/TCP 117s
azure-vote-front LoadBalancer 10.0.70.190 52.179.23.131 80:30074/TCP 117s
kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 48m
AKS示例 – 集群管理
$ az aks scale -g resource-group –n myCluster –-node-count 5
$ az aks upgrade -g resource-group –n myCluster –-kubernetes-version 1.11.1
$ az aks browse -g resource-group –n myCluster
$ az aks delete -g resource-group –n myCluster
AKS 监控
AKS控制平面诊断
谢谢观赏!