Kubernetes 稳定性保障手册:洞察+预案,zookeeper面试内容

{

“_id”: “0ce0e913f6e5516846c654dbd81db6ecab1f684e”,

“name”: “kube-apiserver”,

“description”: “XXX VPC 内”,

“type”: “managed component”,

“dependencies”: {}

},

{

“_id”: “f0740d8bb67520857061a9b71d4a9e4fc50bfe3d”,

“name”: “etcd”,

“description”: “XXX VPC 内”,

“type”: “managed component | storage”,

“dependencies”: {}

},

{

“_id”: “05952a825e91cb50a81cbaf23c6941d5c3bb2c89”,

“name”: “eni-operator”,

“description”: “XXX VPC 内,管理 ENI”,

“type”: “component”,

“dependencies”: {

“serviceaccount”: “enioperator”,

“clusterrole”: “enioperator”,

“clusterrolebinding”: “enioperator”,

“configmaps”: [“eniconfig”],

“secrets”: [“enioperator”]

}

},

{

“_id”: “42699513a7561e89a5f99881d7b05653a1625c51”,

“name”: “Network Service”,

“description”: “提供 VPC/VSwitch 等云网络资源的管理服务”,

“type”: “cloud service”

}

],

“edges”: [

{

“_id”: “38bce9ca8a0cec6d8586d96298bd63b0523fc946”,

“source”: “eni-operator”, “target”: “kube-apiserver”,

“description”: “管理 ENI 请求”

},

{

“_id”: “93f3c21247165f0be3a969fc80f72bc1a402e9f5”,

“source”: “eni-operator”, “target”: “Network Service”,

“description”: “访问阿里云 ECS OpenAPI,管理 VPC/VSwitch 等网络资源”

}

]

}

2. 架构运行图


集群运行过程中,组件及交互关系可以通过外部观测数据推测内部状态,如 log/metrics/trace。与集群架构图结合,可以在静态架构的基础上叠加动态的洞察数据,更直观把握集群的健康状态,如下图:

3.png

其中的数字表征洞察数据,可以是「异常数量」「请求流量」等。除了通过数字进行洞察,还可以使用「颜色表征健康状态」「线条粗细表征流量大小」等。

可通过形如下的数据结构描述:

{

“nodes”: [

{

“_id”: “ea4538dc0625d06b0dc93579998e04288656050f”,

“name”: “mutatehook”,

“deploy”: {

“type”: “K8s:Deployment”,

“namespace”: “kube-system”,

“replicas”: 3

},

“insight”: [

{

“source”: {

“vendor”: “cloud:aliyun:sls”,

“log_project”: “xxx”,

“log_store”: “mutatehook”,

“log_url”: “https://sls.console.aliyun.com/lognext/project/xxx”

},

“signal”: {

“exception”: {

“fuzzy”: “fail OR Fail OR error OR Error”

}

}

}

]

}

],

“edges”: [

{

“_id”: “38bce9ca8a0cec6d8586d96298bd63b0523fc946”,

“source”: “eni-operator”, “target”: “kube-apiserver”,

“insight”:[

{

“source”: {

“vendor”: “cloud:aliyun:sls”,

“log_project”: “xxx”,

“log_store”: “xxx”,

“log_url”: “https://sls.console.aliyun.com/lognext/project/xxx”

},

“signal”: {

“exception”: {

“unauthorized”: “Unauthorized”,

“throttling”: “‘Throttling’ OR ‘throttling’”

}

}

}

]

}

]

}

3. 资源构成图


资源管理是个复杂的话题,通过分析集群中资源的构成关系,也可以尝试通过结构来表征集群的资源构成,节点表征资源,边表征资源的从属或绑定关系。

可通过形如下的数据结构描述:

{

“kinds”: [“vpc”, “vswitch”, “securitygroup”, “ecs”, “clb”, “rds”, “nat”, “eip”],

“tags”: {

“cluster/product”: “xxx”,

“cluster/id”: “2736f42d4e882ad6825d6364545a3f1cb5136859”,

“cluster/name”: “xxx”,

“cluster/env”: “staging”

},

“nodes”: [

{

“kind”: “vpc”,

“nodes”: [

{

“_id”: “c505f21871bac7385c1387988cf226310af0831e”,

“id”: “vpc-xxx”,

“description”: “”,

“ipv4”: “xxx”,

“tags”: {

“resource/creator”: “product”,

“resource/role”: “”

},

“url”: “https://vpc.console.aliyun.com/vpc/xxx”

}

]

},

{

“kind”: “ecs”,

“nodes”: [

{

“_id”: “47c4fe5cc2585a49f07798a0b8b69cda7f8d4a23”,

“id”: “xxx”,

“az”: “xxx”,

“interfaces”: {

“primary”: {

“ip”: “xxx”,

“eni”: “xxx”,

“mac”: “xxx”

}

},

“instance-type-family”: “xxx”,

“instance-type”: “xxx”,

“tags”: {

“resource/creator”: “product”,

“resource/role”: “worker”,

“node/container-runtime”: “xxx”,

“node/user-networking”: “xxx”,

“node/system-networking”: “xxx”

},

“status”: “”,

“condition”: “”,

“url”: “https://ecs.console.aliyun.com/#/server/xxx”

}

]

}

],

“edges”: [

{

“_id”: “a754c748b2723a25c017421dd0969d00df3c000b”,

“source”: “vsw-xxx”, “target”: “vpc-xxx”,

“description”: “”

},

{

“_id”: “c34b164eba2897cfb2b574a576672d8aa441d709”,

“source”: “eip-xxx”, “target”: “ngw-xxx”,

“description”: “”

}

]

}

4. 资源运行图


资源使用过程中,也可以对资源及资源间的关系通过外部观测数据推测内部状态,如 log/metrics/event。与资源构成图结合,可以在静态资源的基础上叠加动态的洞察数据,直观把握集群资源的使用状态。

可通过形如下的数据结构描述:

{

“nodes”: [

{

“_id”: “35103ac62d4ef0a314e2a5128f44c684205bea2f”,

“id”: “vpc”,

“insight”: [

{

“source”: {

“vendor”: “cloud:aliyun:vpc”,

“type”: “OpenAPI”

},

“signal”: {

“vpc/exist”: “DescribeVpcs”,

“vswitch/count”: “DescribeVSwitches”

}

},

{

“source”: {

“vendor”: “cloud:aliyun:ecs”,

“type”: “OpenAPI”

},

“signal”: {

“ecs/count”: “DescribeInstances”,

“securitygroup/count”: “DescribeSecurityGroups”

}

}

]

},

{

“_id”: “6450e07dc67027f76f29fbfcb841e57200855196”,

“id”: “ecs”,

“insight”: [

{

“source”: {

“vendor”: “cloud:aliyun:ecs”,

“type”: “OpenAPI”

},

“signal”: {

“ecs/exist”: “DescribeInstances”,

“ecs/count”: “DescribeInstances”,

“ecs/usage”: “DescribeInstanceMonitorData”

}

},

{

“source”: {

“vendor”: “cloud:aliyun:ecs”,

“type”: “auto”

},

“signal”: {

“ecs/state_change”: “”

}

}

]

}

],

“edges”: [

{

“_id”: “caa1e395c713f47766ca7bcfc20419c0be0f0803”,

“source”: “i-xxx”, “target”: “sg-xxx”,

“insight”: [

{

“source”: {

“vendor”: “cloud:aliyun:ecs”,

“type”: “OpenAPI”

},

“signal”: {

“exist”: “DescribeInstances”

}

}

]

},

{

“_id”: “537dc478d95714792b3694674d6164f72b361bb0”,

“source”: “eip-xxx”, “target”: “ngw-xxx”,

“insight”: [

{

“source”: {

“vendor”: “cloud:aliyun:vpc”,

“type”: “OpenAPI”

},

“signal”: {

“exist”: “DescribeEipAddresses”

}

}

]

}

]

}

预案

=======================================================================

集群出现异常是不可避免的,需要在出现异常时安全、有效处理。

异常可以通过事件来表征,安全、有效的操作是经过评审、演练过的操作,将异常与操作结合,由异常触发操作,形成经过评审、演练的预案,可以安全有效处理集群异常。

1. 事件列表


小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数初中级Java工程师,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年最新Java开发全套学习资料》送给大家,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
img
img
img

由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频

如果你觉得这些内容对你有帮助,可以添加下面V无偿领取!(备注Java)
img

总结

我们总是喜欢瞻仰大厂的大神们,但实际上大神也不过凡人,与菜鸟程序员相比,也就多花了几分心思,如果你再不努力,差距也只会越来越大。实际上,作为程序员,丰富自己的知识储备,提升自己的知识深度和广度是很有必要的。

Mybatis源码解析

数初中级Java工程师,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!**

因此收集整理了一份《2024年最新Java开发全套学习资料》送给大家,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
[外链图片转存中…(img-gS4actzP-1711058316757)]
[外链图片转存中…(img-JI1ZGMK1-1711058316759)]
[外链图片转存中…(img-jJx1sUfA-1711058316759)]

由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频

如果你觉得这些内容对你有帮助,可以添加下面V无偿领取!(备注Java)
[外链图片转存中…(img-73cJmmQd-1711058316760)]

总结

我们总是喜欢瞻仰大厂的大神们,但实际上大神也不过凡人,与菜鸟程序员相比,也就多花了几分心思,如果你再不努力,差距也只会越来越大。实际上,作为程序员,丰富自己的知识储备,提升自己的知识深度和广度是很有必要的。

Mybatis源码解析

[外链图片转存中…(img-Z1flY0A9-1711058316760)]

[外链图片转存中…(img-g1tsMvjR-1711058316761)]

本文已被CODING开源项目:【一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码】收录

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值