Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问怎么部署在K8S上?尝试写了下yaml配置文件无法启动 #238

Open
ChangJieWuAi opened this issue Apr 14, 2023 · 0 comments

Comments

@ChangJieWuAi
Copy link

apiVersion: apps/v1
kind: Deployment
metadata:
name: actionview
namespace: actionview
spec:
replicas: 1
selector:
matchLabels:
app: actionview
template:
metadata:
labels:
app: actionview
spec:
containers:
- name: nginx
image: lxerxa/actionviewnginx:v0.0.2
imagePullPolicy: IfNotPresent
- name: cron
image: lxerxa/actionview:v1.15.2
imagePullPolicy: IfNotPresent
command: ["/bin/bash"]
args: ["/scripts/cronrun.sh"]
initContainers:
- name: db
image: lxerxa/actionviewdb:v1.0.6
imagePullPolicy: IfNotPresent
command: ["/bin/bash"]
args: ["/scripts/run.sh"]
volumeMounts:
- name: db-data
mountPath: /data
- name: web
image: lxerxa/actionview:v1.15.2
imagePullPolicy: IfNotPresent
command: ["/bin/bash"]
args: ["/scripts/run.sh"]
volumeMounts:
- name: web-data
mountPath: /var/www/actionview/storage/app
volumes:
- name: db-data
persistentVolumeClaim:
claimName: db-data
- name: web-data
persistentVolumeClaim:
claimName: web-data

本人新手,想尝试部署在K8S上,请问上面的DB是不是得用statefulset部署?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant