Brc's blog
首页
前端
后端
运维
  • 工作笔记
  • 分类
  • 标签
  • 归档
关于

Brc

努力中
首页
前端
后端
运维
  • 工作笔记
  • 分类
  • 标签
  • 归档
关于
  • 工具安装

  • AWS

  • EKS

    • 扩缩容

    • 存储

    • devops

    • test

      • 保密字典
      • redis
        • ConfigMap
        • PersistentVolumeClaim
        • StatefulSet
        • Service-ClusterIP
        • Service-NodePort
      • mysql
      • rabbitmq
      • mongodb
      • consul
      • xxl-job
      • java
    • CICD

    • 问题
  • 其他

  • AWS创建EKS集群
  • 谷歌云创建GKE集群
  • 工作笔记
  • EKS
  • test
Brc
2023-06-11
目录

redis

# ConfigMap

kind: ConfigMap
apiVersion: v1
metadata:
  name: birenchong-test-redis-conf
  namespace: birenchong-test
  annotations:
    kubesphere.io/creator: admin
data:
  redis.conf: |-
    bind 0.0.0.0
    port 6379
    appendonly yes

1
2
3
4
5
6
7
8
9
10
11
12
13

# PersistentVolumeClaim

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: birenchong-test-redis-pvc
  namespace: birenchong-test
  annotations:
    kubesphere.io/creator: admin
    pv.kubernetes.io/bind-completed: 'yes'
    pv.kubernetes.io/bound-by-controller: 'yes'
    volume.beta.kubernetes.io/storage-provisioner: efs.csi.aws.com
  finalizers:
    - kubernetes.io/pvc-protection
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
  volumeName: pvc-0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0
  storageClassName: efs-sc-dynamic
  volumeMode: Filesystem

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# StatefulSet

kind: StatefulSet
apiVersion: apps/v1
metadata:
  name: birenchong-test-redis-v1
  namespace: birenchong-test
  labels:
    app: birenchong-test-redis
    version: v1
  annotations:
    kubesphere.io/creator: admin
spec:
  replicas: 1
  selector:
    matchLabels:
      app: birenchong-test-redis
      version: v1
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: birenchong-test-redis
        version: v1
      annotations:
        logging.kubesphere.io/logsidecar-config: '{}'
    spec:
      volumes:
        - name: volume-0m0z3f
          persistentVolumeClaim:
            claimName: birenchong-test-redis-pvc
        - name: volume-v6itsf
          configMap:
            name: birenchong-test-redis-conf
            items:
              - key: redis.conf
                path: redis.conf
            defaultMode: 420
      containers:
        - name: redis
          image: 'redis:6.2'
          command:
            - redis-server
          args:
            - /etc/redis/redis.conf
          ports:
            - name: tcp-6379
              containerPort: 6379
              protocol: TCP
          resources: {}
          volumeMounts:
            - name: volume-0m0z3f
              mountPath: /data
              subPath: redis
            - name: volume-v6itsf
              readOnly: true
              mountPath: /etc/redis/redis.conf
              subPath: redis.conf
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: IfNotPresent
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      nodeSelector:
        env: devops
      serviceAccountName: default
      serviceAccount: default
      securityContext: {}
      schedulerName: default-scheduler
  serviceName: birenchong-test-redis
  podManagementPolicy: OrderedReady
  updateStrategy:
    type: RollingUpdate
    rollingUpdate:
      partition: 0
  revisionHistoryLimit: 10

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76

# Service-ClusterIP

kind: Service
apiVersion: v1
metadata:
  name: birenchong-test-redis
  namespace: birenchong-test
  labels:
    app: birenchong-test-redis
    version: v1
  annotations:
    kubesphere.io/creator: admin
    kubesphere.io/serviceType: statefulservice
spec:
  ports:
    - name: tcp-6379
      protocol: TCP
      port: 6379
      targetPort: 6379
  selector:
    app: birenchong-test-redis
  clusterIP: None
  clusterIPs:
    - None
  type: ClusterIP
  sessionAffinity: None
  ipFamilies:
    - IPv4
  ipFamilyPolicy: SingleStack
  internalTrafficPolicy: Cluster

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

# Service-NodePort

kind: Service
apiVersion: v1
metadata:
  name: birenchong-test-redis-np
  namespace: birenchong-test
  labels:
    app: birenchong-test-redis-np
  annotations:
    kubesphere.io/creator: admin
spec:
  ports:
    - name: tcp-6379
      protocol: TCP
      port: 6379
      targetPort: 6379
      nodePort: 31283
  selector:
    app: birenchong-test-redis
    version: v1
  clusterIP: 10.100.124.204
  clusterIPs:
    - 10.100.124.204
  type: NodePort
  sessionAffinity: None
  externalTrafficPolicy: Cluster
  ipFamilies:
    - IPv4
  ipFamilyPolicy: SingleStack
  internalTrafficPolicy: Cluster

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#redis
Last Updated: 2023/11/08, 14:45:54
保密字典
mysql

← 保密字典 mysql→

最近更新
01
谷歌云创建GKE集群
07-26
02
ElastiCacheForRedis启用密码
07-26
03
upload-to-gcs
06-29
更多文章>
Theme by Vdoing | Copyright © 2021-2024 Brc | MIT License | 浙ICP备19031881号-4
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式