blob: bfebf9a2dfee18bafe6285a1ea5b7e71634740c5 [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: nacos
namespace: dubbo-system
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: nacos
serviceName: nacos
template:
metadata:
labels:
app.kubernetes.io/name: nacos
spec:
containers:
- env:
- name: NACOS_SERVER_PORT
value: "8848"
- name: NACOS_APPLICATION_PORT
value: "8848"
- name: PREFER_HOST_MODE
value: "8848"
- name: MODE
value: standalone
- name: EMBEDDED_STORAGE
value: embedded
image: nacos/nacos-cp-server:latest
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
path: /nacos/v1/console/health/liveness
port: 8848
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 10
name: nacos
ports:
- containerPort: 8848
name: http
protocol: TCP
- containerPort: 9848
name: clientgen-rpc
- containerPort: 9849
name: raft-rpc
- containerPort: 7848
name: old-raft-rpc
resources:
limits: {}
requests: {}
startupProbe:
httpGet:
path: /nacos/v1/console/health/readiness
port: 8848
scheme: HTTP
initialDelaySeconds: 180
periodSeconds: 5
timeoutSeconds: 10
volumeMounts:
- mountPath: /home/nacos/plugins/peer-finder
name: data
subPath: peer-finder
- mountPath: /home/nacos/data
name: data
subPath: data
- mountPath: /home/nacos/logs
name: data
subPath: logs
volumes:
- emptyDir: {}
name: data
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/instance: nacos
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: nacos
helm.sh/chart: nacos-0.1.5
name: nacos
namespace: dubbo-system
spec:
ports:
- name: http
port: 8848
protocol: TCP
targetPort: 8848
- name: clientgen-rpc
port: 9848
targetPort: 9848
- name: raft-rpc
port: 9849
targetPort: 9849
- name: old-raft-rpc
nodePort: 30000
port: 7848
protocol: TCP
targetPort: 7848
selector:
app.kubernetes.io/name: nacos
type: NodePort
---