delete nacos

main
ycz008 2023-08-28 15:41:05 +08:00
parent fc6e2b284e
commit ffb6f21151
2 changed files with 0 additions and 192 deletions

View File

@ -1,49 +0,0 @@
apiVersion: v1
kind: ReplicationController
metadata:
name: mysql
labels:
name: mysql
spec:
replicas: 1
selector:
name: mysql
template:
metadata:
labels:
name: mysql
spec:
containers:
- name: mysql
image: mysql:8.0.33
ports:
- containerPort: 3306
volumeMounts:
- name: nacos-mysql-data
mountPath: /var/lib/mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: "---------"
- name: MYSQL_DATABASE
value: "nacos"
- name: MYSQL_USER
value: "nacos"
- name: MYSQL_PASSWORD
value: "Nacos@2099"
volumes:
- name: nacos-mysql-data
hostPath:
path: /data/nacos/mysql
---
apiVersion: v1
kind: Service
metadata:
name: mysql
labels:
name: mysql
spec:
ports:
- port: 3306
targetPort: 3306
selector:
name: mysql

View File

@ -1,143 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: nacos-public
labels:
app: nacos
spec:
type: NodePort
selector:
app: nacos
ports:
- port: 8848
name: server
targetPort: 8848
nodePort: 30848
- port: 9848
name: client-rpc
targetPort: 9848
nodePort: 30948
---
apiVersion: v1
kind: Service
metadata:
name: nacos
labels:
app: nacos
spec:
type: ClusterIP
selector:
app: nacos
ports:
- port: 8848
name: server
targetPort: 8848
- port: 9848
name: client-rpc
targetPort: 9848
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nacos-cm
data:
mysql.host: "mysql"
mysql.db.name: "nacos"
mysql.port: "3306"
mysql.user: "root"
mysql.password: "Admin@2099"
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: nacos
spec:
serviceName: nacos
replicas: 3
selector:
matchLabels:
app: nacos
template:
metadata:
labels:
app: nacos
annotations:
pod.alpha.kubernetes.io/initialized: "true"
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- nacos
topologyKey: "kubernetes.io/hostname"
containers:
- name: nacos
imagePullPolicy: Always
image: nacos/nacos-server:v2.2.2
resources:
requests:
memory: "2Gi"
cpu: "500m"
ports:
- containerPort: 8848
name: client
- containerPort: 9848
name: client-rpc
- containerPort: 9849
name: raft-rpc
- containerPort: 7848
name: old-raft-rpc
env:
- name: NACOS_REPLICAS
value: "3"
- name: MYSQL_SERVICE_HOST
valueFrom:
configMapKeyRef:
name: nacos-cm
key: mysql.host
- name: MYSQL_SERVICE_DB_NAME
valueFrom:
configMapKeyRef:
name: nacos-cm
key: mysql.db.name
- name: MYSQL_SERVICE_PORT
valueFrom:
configMapKeyRef:
name: nacos-cm
key: mysql.port
- name: MYSQL_SERVICE_USER
valueFrom:
configMapKeyRef:
name: nacos-cm
key: mysql.user
- name: MYSQL_SERVICE_PASSWORD
valueFrom:
configMapKeyRef:
name: nacos-cm
key: mysql.password
- name: MYSQL_SERVICE_DB_PARAM
value: "characterEncoding=utf8&connectTimeout=10000&socketTimeout=30000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true"
- name: SPRING_DATASOURCE_PLATFORM
value: "mysql"
- name: MODE
value: "cluster"
- name: NACOS_SERVER_PORT
value: "8848"
- name: PREFER_HOST_MODE
value: "hostname"
- name: NACOS_SERVERS
value: "nacos-0.nacos.common.svc.cluster.local:8848 nacos-1.nacos.common.svc.cluster.local:8848 nacos-2.nacos.common.svc.cluster.local:8848"
- name: NACOS_AUTH_ENABLE
value: "true"
- name: NACOS_AUTH_TOKEN
value: "SSBhbSB0aGUgc3RhZmYgb2Ygd3d3LmJlYWNvbmZpcmVpbmMuY29tCg=="
- name: NACOS_AUTH_IDENTITY_KEY
value: "SSBhbSB0aGUgc3RhZmYgb2Ygd3d3LmJlYWNvbmZpcmVpbmMuY29tCg=="
- name: NACOS_AUTH_IDENTITY_VALUE
value: "SSBhbSB0aGUgc3RhZmYgb2Ygd3d3LmJlYWNvbmZpcmVpbmMuY29tCg=="