configmap创建

1.利用直接值创建 kubectl create configmap configmap_name --from-literal=key-name=value 2.基于文件创建 kubectl create configmap configmap_name --from-file=file_name 3.基于目录创建 kubectl create configmap configmap_name

Affinity亲和性

Affinity亲和力   NodeAffinity:节点亲和力 PreferredDuringSchedulingIgnoredDuringExecution:软亲和力,尽量部署在满足条件的节点上,或者是尽量不要部署在被匹配的节点。 apiVersion: apps/v1 kind: Deployment metadata: name: myapp-deploy-with-node-a

kubectl使用技巧

kubectl技巧 资源类型 下表列出的是 kubernetes 中所有支持的类型和缩写的别名。 资源类型 缩写别名 clusters componentstatuses cs configmaps cm daemonsets ds deployments deploy endpoints ep event ev horizontalpodautoscalers hpa ingresses ing