blob: fb5ae446634471fa5bf8093af141b41f86ac85da [file] [log] [blame]
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: nacos
namespace: default
spec:
serviceName: nacos
replicas: 1
selector:
matchLabels:
app: nacos
template:
metadata:
labels:
app: nacos
spec:
containers:
- name: nacos
image: "nacos/nacos-server:latest"
imagePullPolicy: IfNotPresent
startupProbe:
httpGet:
scheme: HTTP
port: 8848
path: /nacos/v1/console/health/readiness
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 10
livenessProbe:
httpGet:
scheme: HTTP
port: 8848
path: /nacos/v1/console/health/liveness
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 10
ports:
- name: http
containerPort: 8848
protocol: TCP
- containerPort: 9848
name: client-rpc
- containerPort: 9849
name: raft-rpc
- containerPort: 7848
name: old-raft-rpc
env:
- name: NACOS_SERVER_PORT
value: "8848"
- name: NACOS_APPLICATION_PORT
value: "8848"
- name: PREFER_HOST_MODE
value: "hostname"
- name: MODE
value: "standalone"
- name: EMBEDDED_STORAGE
value: embedded
resources:
requests:
cpu: 100m
memory: 500Mi
volumeMounts:
- name: storage
mountPath: /var/lib/nacos
- name: data
mountPath: /home/nacos/plugins/peer-finder
subPath: peer-finder
- name: data
mountPath: /home/nacos/data
subPath: data
- name: data
mountPath: /home/nacos/logs
subPath: logs
volumes:
- name: data
emptyDir: {}
- name: storage
persistentVolumeClaim:
claimName: nacos-pvc