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
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
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
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
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
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
Last Updated: 2023/11/08, 14:45:54