Kubernetes - YAML
|Word Count:14|Reading Time:1mins
YAML
API 对象
列表 + 诊断
描述
文档 + 模板
Author: zhongmingmao
Copyright Notice: All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Related Articles

2023-01-27
Kubernetes - Operator
应用接入应用容器化开销风险 Log Driver Blocking mode Non-Blocking mode 共享 Kernel 共享系统参数配置 进程数共享 fd 数共享 主机磁盘共享 资源监控应用视角 容器中看到的资源是主机资源 top Java Runtime.availableProcessors() cat /proc/cpuinfo cat /proc/meminfo df -k 影响应用 Java Concurrent GC Thread Heap Size 线程数不可控 判断规则 查询 /proc/1/cgroup 是否包含 kubepods 关键字 12345678910111213141516171819202122232425262728293031323334$ cat /proc/1/cgroup12:cpuset:/11:devices:/init.scope10:blkio:/init.scope9:freezer:/8:net_cls,net_prio:/7:pids:/init.scope6:pe...

2022-11-03
Kubernetes - Health
Resources 基于 cgroup 技术 内存使用 Ki、Mi、Gi 来表示 KB、MB、GB;Kubernetes 里 vCPU 的最小使用单位为 0.001,即 m nginx-pod-resources.yaml12345678910111213141516apiVersion: v1kind: Podmetadata: name: nginx-pod-resourcesspec: containers: - name: nginx image: nginx:alpine resources: requests: cpu: 10m memory: 100Mi limits: cpu: 20m memory: 200Mi 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859$ k apply -f nginx-pod-resou...

2022-07-08
Kubernetes - Dockerfile

2023-02-04
DevOps - Foundation
基本原理核心原理 隔离机制 运行 Nginx 镜像 1234567891011121314151617$ docker run -d nginx:latestUnable to find image 'nginx:latest' locallylatest: Pulling from library/nginx25d3892798f8: Pull complete42de7275c085: Pull completec459a9332e03: Pull complete48882f13d668: Pull complete49180167b771: Pull completeda4abc2b066c: Pull complete20dc44ab57ab: Pull completeDigest: sha256:5f44022eab9198d75939d9eaa5341bc077eca16fa51d4ef32d33f1bd4c8cbe7dStatus: Downloaded newer image for nginx:latestd821171713e9b805c4180c122...

2022-10-31
Kubernetes - NFS
架构 搭建Server1$ sudo apt install nfs-kernel-server 配置 - /etc/exports 1/tmp/nfs 192.168.191.0/24(rw,sync,no_subtree_check,no_root_squash,insecure) 让配置生效 1234$ sudo exportfs -ra$ sudo exportfs -v/tmp/nfs 192.168.191.0/24(sync,wdelay,hide,no_subtree_check,sec=sys,rw,insecure,no_root_squash,no_all_squash) 启动 NFS Server 12345678910111213141516$ sudo systemctl start nfs-server$ sudo systemctl enable nfs-server$ sudo systemctl status nfs-server● nfs-server.service - NFS server and se...

2022-10-29
Kubernetes - Another example
架构 MariaDB ConfigMap maria-cm.yaml12345678910apiVersion: v1kind: ConfigMapmetadata: name: maria-cmdata: DATABASE: 'db' USER: 'wp' PASSWORD: '123' ROOT_PASSWORD: '123' 12$ k apply -f maria-cm.yamlconfigmap/maria-cm created Deployment maria-deploy.yaml1234567891011121314151617181920212223242526apiVersion: apps/v1kind: Deploymentmetadata: name: maria-deploy labels: app: maria-deployspec: replicas: 1 selector: matchLabels: app: maria-deploy ...
Announcement
Things are always unexpected!









