石墨文档Go在K8S上微服务的实践-彭友顺• Proto的管理 • 错误码管理 • 调试gRPC • 调试信息 • 错误定位 问题:每种开源组件的配置、调用方式、debug方式、记录日志方式都不一样 微服务的开发阶段 问题:gRPC未设置连接错误,阻塞模式报错不正确 Redis、MySQL连接数配置未设置?超时未设置? 配置 对接 Debug • 配置驱动 • 配置补齐 • 配置工具 • Proto的管理 WithBlock(). 默认补齐配置,给出最佳实践 微服务的开发阶段 IDE的体验,右键插入资源引用,悬停查看资源信息 配置 对接 Debug • 配置驱动 • 配置补齐 • 配置工具 • Proto的管理 • 错误码管理 • 调试gRPC • 调试信息 • 错误定位 配置版本,发布,回滚,可以更加方便 微服务的开发阶段 统一采用gRPC协议和protobuf编解码 CI check 配置补齐 • 配置工具 • Proto的管理 • 错误码管理 • 调试gRPC • 调试信息 • 错误定位 微服务的开发阶段 配置 对接 Debug • 配置驱动 • 配置补齐 • 配置工具 • Proto的管理 • 错误码管理 • 调试gRPC • 调试信息 • 错误定位 Generate • protoc -I {error proto file} --go-errors_out={output0 码力 | 41 页 | 3.20 MB | 1 年前3
Kubernetes开源书 - 周立secret命令 创建Secret) 假设Pod需要访问数据库。Pod所使⽤的⽤户名和密码在本地机器上的 ./username.txt 和 ./password.txt ⽂件中。 # Create files needed for rest of example. $ echo -n "admin" > ./username.txt $ echo -n "1f2d1e2e67df" > ./password 供Pod中的容器使⽤。 它们也可被系统的其他部分使⽤, ⽽不会直接暴露在Pod内。例如,它们可保存系统其他部分应该使⽤的凭据,从⽽代表你外部系统进⾏交互。 Using Secrets as Files from a Pod(使⽤Secret作为来⾃Pod的⽂件) 在Pod中的volume中使⽤Secret: 1. 创建⼀个secret或使⽤现有的secret。多个Pod可引⽤相同的secret。 中指定的key。如果要投影Secret中的所有key,那么所有 key都必须列在 items 字段中。 所有列出的key必须存在于相应的Secret中。否则,Volume不会被创建。 Secret files permissions (Secret⽂件权限) 你也可以指定⼀个Secret的权限模式位。如不指定,默认使⽤ 0644 。可指定整个Secret Volume的默认模式,并根据 需要覆盖每个key。0 码力 | 135 页 | 21.02 MB | 1 年前3
k8s操作手册 2.3#查看k8s node结点上的路由表 default via 10.99.1.1 dev ens33 proto sta�c metric 100 #k8s服务器底层默认路由 10.99.1.0/24 dev ens33 proto kernel scope link src 10.99.1.61 metric 100 10.244.0.0/24 via 0 dev flannel.1 onlink #去往10.244.2/24的pod网段下一跳指向flannel.1 10.244.3.0/24 dev cni0 proto kernel scope link src 10.244.3.1 #本node结点上的pod网段 #由上面的路由表可得知,各k8s服务器上的pod容器并不是在同一个二层广播域 kubernetes.io~nfs/pv-nfs-01 nfs4 rw,rela�me,vers=4.1,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,�meo=600,retrans=2,sec=sys,clien taddr=10.99.1.242,local_lock=none,addr=10.99.1.246 0 0 # cat0 码力 | 126 页 | 4.33 MB | 1 年前3
运维上海2017-Kubernetes 在大规模场景下的service性能优化实战 - 杜军dummy # ip addr add 192.168.2.2/32 dev dummy0 ü �P��� # ip route add to local 192.168.2.2/32 dev eth0 proto kernel ü �GCK # ifconfig eth0:1 192.168.2.2 netmask 255.255.255.255 up • IPVS Virtual Server # ipvsadm0 码力 | 38 页 | 3.39 MB | 1 年前3
Kubernetes Native DevOps Practicescheduler policy Build tasks and the dependent environments(sidecar) Share files between containers, or cache build files Container Image - Image of build / dependent environment [] Command [] Args - Argument [] Env - Environment variable [] VolumeMounts - Files to be shared or persisted [] Resources - Resource requirement ActiveDeadlineSeconds Timeout CI/CD Examples - Artifact Management user scripts using ConfigMap Job - pod template • upload files to storage service once user build completes - volumes Storage APIs user build task • build the0 码力 | 21 页 | 6.39 MB | 1 年前3
Jib Kubecon 2018 TalkConfiguration JVM flags credentials labels environment variables extra files ... github.com/GoogleContainerTools/jib Demo $ git clone https://github.com/coollog/micronaut-jib Dockerfile “script” FROM base container image RUN commands to install dependencies COPY application files over Configure the ENTRYPOINT Run the container Produces some layers Produces some layers github com/GoogleContainerTools/jib Pure Java github.com/GoogleContainerTools/jib A container image is a directory of files github.com/GoogleContainerTools/jib Docker Image Format Tarballs that compose into a single0 码力 | 90 页 | 2.84 MB | 1 年前3
Node Operator: Kubernetes Node Management Made SimpleCRs. • Node-Operator: difference Machine and Node state, manage Node softwares and configure files. • Machine: the instance of Machine CRD with node basic information, which represent a node desired0 码力 | 18 页 | 11.70 MB | 1 年前3
Apache OpenWhisk + Kubernetes:
A Perfect Match for Your Serverless Platformgrade container orchestration platform § Declarative management of objects using configuration files. § More introductions, go to • K8s official document http://kubernetes.io • Open Tech Mini0 码力 | 24 页 | 3.53 MB | 1 年前3
Автоматизация управления ClickHouse-кластерами в KubernetesExamples - clickhouse-operator docs ClickHouse operator – начало • Хочу во всем разобраться Get files from github repo: git clone https://github.com/Altinity/clickhouse-operator Install the operator:0 码力 | 44 页 | 2.24 MB | 1 年前3
共 9 条
- 1













