分类

链接

2021 年 7 月
 1234
567891011
12131415161718
19202122232425
262728293031  

近期文章

热门标签

新人福利,免费薅羊毛

现在位置:    首页 > k8s, MySQL > 正文
共享办公室出租
k8s之ReplicationController
k8s, MySQL 暂无评论 阅读(183)
  1. kind: ReplicationController
  2. apiVersion: v1
  3. metadata:
  4.   name: mysql-rc
  5.   namespace: default
  6.   uid: 946f2c6a-f7ac-4412-b3c9-3741fe668717
  7.   resourceVersion: '1299573'
  8.   generation: 3
  9.   creationTimestamp: '2021-05-17T09:16:19Z'
  10.   labels:
  11.     name: mysql-rc
  12. spec:
  13.   replicas: 1
  14.   selector:
  15.     name: mysql-pod
  16.   template:
  17.     metadata:
  18.       labels:
  19.         name: mysql-pod
  20.     spec:
  21.       volumes:
  22.         - name: mysql-storage
  23.           persistentVolumeClaim:
  24.             claimName: mysql-pvc
  25.         - name: config
  26.           configMap:
  27.             name: mysql-config
  28.         - name: localtime
  29.           hostPath:
  30.             path: /etc/localtime
  31.             type: File
  32.       containers:
  33.         - name: mysql
  34.           image: 'mysql:5.7'
  35.           ports:
  36.             - containerPort: 3306
  37.               protocol: TCP
  38.           env:
  39.             - name: MYSQL_ROOT_PASSWORD
  40.               value: mysql
  41.           resources: {}
  42.           volumeMounts:
  43.             - name: mysql-storage
  44.               mountPath: /var/lib/mysql
  45.             - name: config
  46.               mountPath: /etc/mysql/conf.d/my.cnf
  47.               subPath: my.cnf
  48.          

============ 欢迎各位老板打赏~ ===========

本文版权归Bruce's Blog所有,转载引用请完整注明以下信息:
本文作者:Bruce
本文地址:k8s之ReplicationController | Bruce's Blog

发表评论

留言无头像?