加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
httpserver.yaml 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
kevin186 提交于 2022-02-27 16:06 . model8
apiVersion: apps/v1
kind: Deployment
metadata:
name: httpserver
labels:
app: httpserver
spec:
replicas: 1
selector:
matchLabels:
app: httpserver
template:
metadata:
labels:
app: httpserver
spec:
imagePullSecrets:
- name: mysecretskey
containers:
- name: httpserver
image: kevinstudy/mod8:v1
# ports:
# - containerPort: 80
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]
# preStop:
# exec:
# command: ["/usr/sbin/nginx","-s","quit"]
readinessProbe:
httpGet:
path: /healthz
port: 80
initialDelaySeconds: 30
periodSeconds: 5
successThreshold: 2
resources:
limits:
memory: "500Mi"
cpu: "300m"
requests:
memory: "500Mi"
cpu: "300m"
volumeMounts:
- name: httpcnf
mountPath: /usr/local/
subPath: http.conf
- name: httpcnf
mountPath: /usr/local/nginx
subPath: httpserver.conf
volumes:
- name: httpcnf
configMap:
name: httpconf
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化