k8s配置
--- apiVersion: apps/v1 kind: Deployment metadata: name: nacos namespace: com spec: selector: matchLabels: app: nacos-server replicas: 1 revisionHistoryLimit: 1 strategy: type: Recreate template: metadata: labels: app: nacos-server spec: containers: - name: nacos-server image: ${imageUrl} imagePullPolicy: IfNotPresent resources: requests: ephemeral-storage: 1Gi cpu: 1 memory: 2Gi limits: ephemeral-storage: 100Gi cpu: 4 memory: 8Gi ports: - containerPort: 8848 env: - name: MODE value: 'standalone' readinessProbe: exec: command: ["curl","http://localhost:8848/nacos/"] initialDelaySeconds: 26 periodSeconds: 25 timeoutSeconds: 600 livenessProbe: exec: command: ["curl","http://localhost:8848/nacos/"] initialDelaySeconds: 300 periodSeconds: 30 timeoutSeconds: 600 volumeMounts: ${configmapMounts} - name: localtime mountPath: /etc/localtime volumes: ${configmapVolumes} - name: localtime hostPath: path: /etc/localtime --- apiVersion: v1 kind: Service metadata: namespace: zhxy name: nacos-server labels: app: nacos-server spec: ports: - port: 8848 targetPort: 8848 type: ClusterIP sessionAffinity: None selector: app: nacos-server
naocs配置文件可以进行覆盖,在默认的配置文件上进行修改
标签:name,Kubernetes,app,nacos,server,8848,安装,localtime From: https://www.cnblogs.com/hyiam/p/17450993.html