在您的kubernetes部署文件中,当您的应用程序在端口3001上公开时,您已在端口5000上公开了就绪探测,同时运行容器几次我获得了OOMKilled,因此增加了内存限制。无论如何,部署文件下面应该可以正常工
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: qotm
spec:
replicas: 1
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: qotm
spec:
containers:
- name: qotm
image: <YOUR_IMAGE>
imagePullPolicy: Always
ports:
- name: http-api
containerPort: 3001
readinessProbe:
httpGet:
path: /health
port: 3001
initialDelaySeconds: 30
periodSeconds: 3
resources:
limits:
cpu: "0.1"
memory: 200Mi
</code>