首次提交:初始化项目代码

This commit is contained in:
sunct
2026-07-31 15:24:14 +08:00
commit 8d3c97bd01
73 changed files with 11720 additions and 0 deletions
+66
View File
@@ -0,0 +1,66 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql
namespace: cloudnest
labels:
app: mysql
spec:
replicas: 1
selector:
matchLabels:
app: mysql
template:
metadata:
labels:
app: mysql
spec:
containers:
- name: mysql
image: mysql:8.0
env:
- name: MYSQL_ROOT_PASSWORD
value: "cloudnest123"
- name: MYSQL_DATABASE
value: "cloudnest"
ports:
- containerPort: 3306
name: mysql
resources:
limits:
memory: "256Mi"
cpu: "500m"
requests:
memory: "128Mi"
cpu: "100m"
readinessProbe:
exec:
command: ["mysqladmin", "ping", "-h", "127.0.0.1", "-uroot", "-pcloudnest123"]
initialDelaySeconds: 15
periodSeconds: 10
livenessProbe:
exec:
command: ["mysqladmin", "ping", "-h", "127.0.0.1", "-uroot", "-pcloudnest123"]
initialDelaySeconds: 30
periodSeconds: 20
volumeMounts:
- name: mysql-data
mountPath: /var/lib/mysql
volumes:
- name: mysql-data
hostPath:
path: /data/mysql
type: DirectoryOrCreate
---
apiVersion: v1
kind: Service
metadata:
name: mysql
namespace: cloudnest
spec:
selector:
app: mysql
ports:
- port: 3306
targetPort: 3306
name: mysql