Skip to content

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

@zzhkhyl

Description

@zzhkhyl

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部署?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions