跳到主要内容

kubelets_学习

#1 deployment 部署

blog

apiVersion: apps/v1
kind: Deployment
metadata:
namespace: zhenxi1
name: k3s-blog
labels:
app: k3s-blog
spec:
replicas: 1
template:
metadata:
name: k3s-blog
labels:
app: k3s-blog
spec:
containers:
- name: k3s-blog
image: registry.cn-qingdao.aliyuncs.com/zhenxi-v1/blog
imagePullPolicy: IfNotPresent
restartPolicy: Always
imagePullSecrets: #拉取镜像所需秘钥
- name: ali
selector:
matchLabels:
app: k3s-blog

static

apiVersion: apps/v1
kind: Deployment
metadata:
namespace: zhenxi1
name: k3s-static
labels:
app: k3s-static
spec:
replicas: 1
template:
metadata:
name: k3s-static
labels:
app: k3s-static
spec:
containers:
- name: k3s-static
image: registry.cn-qingdao.aliyuncs.com/zhenxi-v1/static
imagePullPolicy: IfNotPresent
restartPolicy: Always
imagePullSecrets:
- name: ali
selector:
matchLabels:
app: k3s-static