feat(ops): kubernetes deployment
This commit is contained in:
40
microblogpub-deployment.yaml
Normal file
40
microblogpub-deployment.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: microblogpub
|
||||
namespace: microblogpub
|
||||
labels:
|
||||
app: microblogpub
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: microblogpub
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: microblogpub
|
||||
spec:
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
containers:
|
||||
- name: microblogpub
|
||||
image: microblogpub:latest
|
||||
imagePullPolicy: Never
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
volumeMounts:
|
||||
- name: data-volume
|
||||
mountPath: /app/data
|
||||
- name: static-volume
|
||||
mountPath: /app/app/static
|
||||
volumes:
|
||||
- name: data-volume
|
||||
hostPath:
|
||||
path: /home/u/server_one/common/b1-66er.tld/data
|
||||
type: DirectoryOrCreate
|
||||
- name: static-volume
|
||||
hostPath:
|
||||
path: /home/u/server_one/common/b1-66er.tld/app/static
|
||||
type: DirectoryOrCreate
|
Reference in New Issue
Block a user