中间件下载使用helm,这里部署的都是单机版的
aws-ebs-storageclass.yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:name: aws-ebs-storageclass
provisioner: kubernetes.io/aws-ebs
parameters:type: gp2 # 选择合适的 EBS 类型,如 gp2、io1、gp3 等encrypted: "false" # 是否加密卷,默认为 falsekmskeyid: "" # 如果使用 KMS 加密,则指定 KMS key ID
reclaimPolicy: Delete # 当 PersistentVolume 被删除时的回收策略,默认为 Delete
volumeBindingMode: WaitForFirstConsumer # 在绑定到 Pod 之前等待卷绑定,默认为 Immediate
allowVolumeExpansion: true # 允许扩展 PersistentVolumeClaim
my-ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:name: my-ingress
spec:# defaultBackend:# resource:# apiGroup: k8s.example.com# kind: StorageBucket# name: static-assets#指定ingress控制器类型为nginx,不同的控制器表示不一样,可以查看官方文档进行查阅ingressClassName: nginxrules:#指定请求的域名- host: www.xxx.comhttp:paths:#指定请求的路径- path: /pathType: Prefixbackend:#指定要暴露的应用(Pod)的service,所以使用ingress之前是一定要先创建service的,它是基于service来发现这一组要被请求的pod的service:name: web#指定要暴露的service的内部port端口port:number: 80#指定请求的域名- host: dash.xxx.comhttp:paths:#指定请求的路径- path: /pathType: Prefixbackend:#指定要暴露的应用(Pod)的service,所以使用ingress之前是一定要先创建service的,它是基于service来发现这一组要被请求的pod的service:name: dashboard#指定要暴露的service的内部port端口port:number: 80#指定请求的域名- host: api.xxx.comhttp:paths:#指定请求的路径- path: /pathType: Prefixbackend:#指定要暴露的应用(Pod)的service,所以使用ingress之前是一定要先创建service的,它是基于service来发现这一组要被请求的pod的service:name: api#指定要暴露的service的内部port端口port:number: 17176
mysql-value.yaml
global:storageClass: "aws-ebs-storageclass" # 根据您的环境选择存储类
image:registry: docker.iorepository: bitnami/mysqltag: 8.4.3-debian-12-r0#tag: 8.0.23-debian-10-r0## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'pullPolicy: IfNotPresent
## @param architecture MySQL architecture (`standalone` or `replication`)
##
architecture: standalone
auth:## @param auth.rootPassword Password for the `root` user. Ignored if existing secret is providedrootPassword: '123456'## @param auth.createDatabase Whether to create the .Values.auth.database or not## ref: https://github.com/bitnami/containers/tree/main/bitnami/mysql#creating-a-database-on-first-run##createDatabase: true## @param auth.database Name for a custom database to create## ref: https://github.com/bitnami/containers/tree/main/bitnami/mysql#creating-a-database-on-first-run##database: "mydatabase"## @param auth.username Name for a custom user to create## ref: https://github.com/bitnami/containers/tree/main/bitnami/mysql#creating-a-database-user-on-first-run##username: "user1"## @param auth.password Password for the new user. Ignored if existing secret is provided###password: "user1"primary:persistence:enabled: truesubPath: ""storageClass: "aws-ebs-storageclass" # 存储类size: 16Gi # 初始请求的大小# hostPath:# path: /database/mysql/data/service:type: NodePortports:mysql: 3306mysqlx: 33060nodePorts:mysql: 31006mysqlx: 31060
rabbit-value.yaml
global:storageClass: "aws-ebs-storageclass"
image:registry: docker.iorepository: bitnami/rabbitmqtag: 4.0.2-debian-12-r0# pullPolicy: IfNotPresentpullPolicy: Always# 账号密码
auth:username: rabbitpassword: "rabbit"securePassword: false
## @param plugins List of default plugins to enable (should only be altered to remove defaults; for additional plugins use `extraPlugins`)
##
#plugins: "rabbitmq_management rabbitmq_peer_discovery_k8s"## @param communityPlugins List of Community plugins (URLs) to be downloaded during container initialization
## Combine it with extraPlugins to also enable them.
##
communityPlugins: "https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/v4.0.2/rabbitmq_delayed_message_exchange-4.0.2.ez"
## @param extraPlugins Extra plugins to enable (single string containing a space-separated list)
## Use this instead of `plugins` to add new plugins
##
extraPlugins: "rabbitmq_auth_backend_ldap rabbitmq_delayed_message_exchange"
# 集群实例数量
replicaCount: 1# 资源配置
resources:requests: cpu: 100mmemory: 2Gilimits:cpu: 2000mmemory: 2Gi# 持久化存储
persistence:enabled: truestorageClass: "aws-ebs-storageclass"size: 8Gi# service 配置
service:type: NodePort
redis-value.yaml
global:storageClass: "aws-ebs-storageclass"redis:password: ""architecture: standalonecommonConfiguration: |-appendonly yessave "300 10"master:resources:limits: cpu: 2memory: 4Girequests: cpu: 500mmemory: 2GinodeSelector: {}tolerations: []persistence:size: 10Giservice:type: NodePortnodePorts:redis: "30502"