首页 > 数据库 >使用kubersphere 安装有状态服务 MySQL

使用kubersphere 安装有状态服务 MySQL

时间:2022-08-19 10:27:06浏览次数:63  
标签:his name default kubesphere MySQL volume mysql kubersphere 安装

kind: StatefulSet
apiVersion: apps/v1
metadata:
  name: his-mysql
  namespace: his
  labels:
    app: his-mysql
  annotations:
    kubesphere.io/creator: dev-zhao
    kubesphere.io/description: mysql应用
spec:
  replicas: 1
  selector:
    matchLabels:
      app: his-mysql
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: his-mysql
      annotations:
        cni.projectcalico.org/ipv4pools: '["default-ipv4-ippool"]'
        logging.kubesphere.io/logsidecar-config: '{}'
    spec:
      volumes:
        - name: host-time
          hostPath:
            path: /etc/localtime
            type: ''
        - name: volume-fynj86
          persistentVolumeClaim:
            claimName: mysql-pvc
        - name: volume-7hkeyp
          configMap:
            name: mysql-conf
            defaultMode: 420
      containers:
        - name: container-jyt8q2
          image: 'mysql:5.7.35'
          ports:
            - name: tcp-3306
              containerPort: 3306
              protocol: TCP
            - name: tcp-33060
              containerPort: 33060
              protocol: TCP
          env:
            - name: MYSQL_ROOT_PASSWORD
              value: '123456'
          resources:
            limits:
              cpu: 100m
              memory: 40Mi
          volumeMounts:
            - name: host-time
              readOnly: true
              mountPath: /etc/localtime
            - name: volume-fynj86
              mountPath: /var/lib/mysql
            - name: volume-7hkeyp
              readOnly: true
              mountPath: /etc/mysql/conf.d
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: IfNotPresent
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      serviceAccountName: default
      serviceAccount: default
      securityContext: {}
      affinity: {}
      schedulerName: default-scheduler
  serviceName: his-mysql-qlu9
  podManagementPolicy: OrderedReady
  updateStrategy:
    type: RollingUpdate
    rollingUpdate:
      partition: 0
  revisionHistoryLimit: 10

标签:his,name,default,kubesphere,MySQL,volume,mysql,kubersphere,安装
From: https://www.cnblogs.com/netflix/p/16601074.html

相关文章

  • Docker安装Redis
    1.下载Redis镜像sudodockerpullredis 2.启动Redissudomkdir-p/mydata/redis/confsudotouch/mydata/redis/conf/redis.confsudodockerrun-p63......
  • mysql innodb 为什么用B+树作为索引数据结构,而非其他结构
    B树的层数较低,即意味着读取磁盘的次数较少在mysql中一个节点的大小是16K,如果一行数据约1k,其主键为8字节的bigint,那么3层即可容纳约2000万行对比其他结构:hash不体现......
  • mysql 的安装
    1.链接进入mysql官网  https://www.mysql.com2.点击download   3.滑动到下面找到社区版  4.找到这个点击5.点击Archives  6.可以选择自己想要的......
  • Dockers安装Oracle 11g
    1,下载Oracle镜像dockerpullregistry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g 2,启动容器dockerrun-d-p1521:1521--nameoracleregistry.cn-hangzh......
  • 华为服务器修改ibmc账号密码、配置raid5、安装系统
     修改ibmc账号密码转载自:https://www.cnblogs.com/mtactor/p/2288V5.html 昵称:mtactor方法一:采用网线直连管理口1、使用网线直接连接服务器的Mgmt口,另外一端连接......
  • pprint的安装
    (d2l)[root@localhostxbiquge_w]#pipinstallpprint-ihttp://pypi.douban.com/simple/--trusted-hostpypi.douban.comLookinginindexes:http://pypi.douban.com......
  • Docker安装MySQL
    1,docker仓库搜索mysqldockersearchmysql  2,docker仓库拉取mysql8.0dockerpullmysql:8.0  3,查看本地仓库镜像是否下载成功dockerimagesmysql:8.0......
  • Docker安装nacos
    1.下载Nacos镜像sudodockerpullnacos/nacos-server:1.3.2 2.创建数据库/**Copyright1999-2018AlibabaGroupHoldingLtd.**LicensedundertheApac......
  • mysqldump 在 StoneDB 中的使用注意事项
    InnoDB导入StoneDB此场景是利用mysqldump从InnoDB导出,然后再导入StoneDB,在导入StoneDB前,需要对导出文件做如下修改。1)修改存储引擎CREATETABLE`t_user`(xxx)ENGIN......
  • MySQL Server可执行注释
    MySQLServer当前支持如下3种注释风格:以'#'开头的单行注释以'--'开头的单行注释C语言风格的单行/多行注释如下sql脚本给出了3种注释风格的示例:/*这是一个多行注......