https://www.gravatar.com/avatar/f819a092b23cb25a09f87436f68df217?s=240&d=mp

Ang Gao

Software Engineer @ TripAdvisor, CS Ph.D @ University College Cork

Kind Cluster issue

To use Kind cluster you need to have overlay(2) storage driver with Docker if you are using XFS filesystem. overlayfs-driver https://docs.docker.com/storage/storagedriver/overlayfs-driver/ The overlay and overlay2 drivers are supported on xfs backing filesystems, but only with d_type=true enabled. 1 2 3 4 5 6 7 8 9 10 11 xfs_info / meta-data=/dev/mapper/centos_agao isize=512 agcount=4, agsize=3276800 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=0 spinodes=0 data = bsize=4096 blocks=13107200, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 ftype=1 log =internal bsize=4096 blocks=6400, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 The 3rd column of the 6th line of the xfs_info output is the most interesting because it contains the parameter ftype which should be 1.

Kubernetes Note 05

对于一个 Deployment 所管理的 Pod,它的 ownerReference 是 ReplicaSet ReplicaSet 负责通过控制器模式,保证系统中 Pod 的个数永远等于指定的个数 Deployment 只允许容器的 restartPolicy=Always 水平扩展 $ kubectl scale deployment nginx-deployment --replicas=4 滚动更新 R

Kubernetes Note 04

容器健康检查和恢复机制 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 apiVersion:v1kind:Podmetadata:labels:test:livenessname:test-liveness-execspec:containers:- name:livenessimage:busyboxargs:- /bin/sh- -c- touch/tmp/healthy;sleep30;rm-rf/tmp/healthy;sleep600livenessProbe:exec:command:- cat- /tmp/healthyinitialDelaySeconds:5periodSeconds:5 Pod 的恢复过程,永远都是发生在当前节点上,而不会跑到别的节点上去

Kubernetes Note 03

使用一种 API 对象(Deployment)管理另一种 API 对象(Pod)的方法,在 Kubernetes 中,叫作“控制器”模式(controller pattern) 1 2

Kubernetes Note 02

Kubernetes 项目的架构,跟它的原型项目 Borg 非常类似,都由 Master 和 Node 两种节点组成 Master 节点 负责 API 服务的 kube-apiserver 负责调度的 kube-scheduler 负责容器编排的 kube-controller-manager 集群的持久化数据,则由 kube-apiserver 处理后

Kubernetes Note 01

容器技术的核心功能,就是通过约束和修改进程的动态表现,从而为其创造出一个“边界” Cgroups 技术是用来制造约束的主要手段,而 Namespace 技术则是用来修改进程视图