Skip to content

Commit f53d2e4

Browse files
committed
add k8s and vault steps
1 parent 38aca2a commit f53d2e4

24 files changed

+899
-0
lines changed

k8s-docs/README.md

Lines changed: 364 additions & 0 deletions
Large diffs are not rendered by default.

k8s-docs/demo/.DS_Store

6 KB
Binary file not shown.

k8s-docs/demo/clusterRecover.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
kubectl patch rec rec --type merge --patch '{"spec":{"clusterRecovery":true}}'
2+

k8s-docs/demo/getClusterUnPw.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
kubectl get secret -n demo rec -o go-template='{{range $k,$v := .data}}{{"### "}}{{$k}}{{"\n"}}{{$v|base64decode}}{{"\n\n"}}{{end}}'

k8s-docs/demo/getDatabasePw.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
echo "information on redis-enterprise-database\n"
2+
kubectl -n demo get secret redb-redis-enterprise-database -o go-template='{{range $k,$v := .data}}{{"### "}}{{$k}}{{"\n"}}{{$v|base64decode}}{{"\n\n"}}{{end}}'
3+
# sleep is used because some of the commands are async
4+
sleep 5
5+
echo "information on redis-meta\n"
6+
kubectl -n demo get secret redb-redis-meta -o go-template='{{range $k,$v := .data}}{{"### "}}{{$k}}{{"\n"}}{{$v|base64decode}}{{"\n\n"}}{{end}}'
7+
sleep 5
8+
echo "\nredis-enterprise-database password\n"
9+
kubectl -n demo get secret redb-redis-enterprise-database -o=jsonpath={.data.password} | base64 -d
10+
echo "\nredis-meta password\n"
11+
kubectl -n demo get secret redb-redis-meta -o=jsonpath={.data.password} | base64 -d
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: app.redislabs.com/v1alpha1
2+
kind: RedisEnterpriseDatabase
3+
metadata:
4+
name: redis-enterprise-database
5+
spec:
6+
memorySize: 500MB
7+
persistence: "snapshotEvery1Hour"
8+
rolesPermissions:
9+
- type: redis-enterprise
10+
role: "Admin"
11+
acl: "Full Access"
12+
- type: redis-enterprise
13+
role: "DB Member"
14+
acl: "Full Access"

k8s-docs/demo/redis-meta.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: app.redislabs.com/v1alpha1
2+
kind: RedisEnterpriseDatabase
3+
metadata:
4+
name: redis-meta
5+
spec:
6+
memorySize: 500MB
7+
persistence: "snapshotEvery1Hour"
8+
rolesPermissions:
9+
- type: redis-enterprise
10+
role: "DB Member"
11+
acl: "Full Access"
12+
- type: redis-enterprise
13+
role: "Admin"
14+
acl: "Full Access"
15+
modulesList:
16+
- name: timeseries
17+
version: 1.6.9

k8s-docs/demo/redisinsight.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: redisinsight #deployment name
5+
labels:
6+
app: redisinsight #deployment label
7+
spec:
8+
replicas: 1 #a single replica pod
9+
selector:
10+
matchLabels:
11+
app: redisinsight #which pods is the deployment managing, as defined by the pod template
12+
template: #pod template
13+
metadata:
14+
labels:
15+
app: redisinsight #label for pod/s
16+
spec:
17+
containers:
18+
- name: redisinsight #Container name (DNS_LABEL, unique)
19+
image: redislabs/redisinsight:latest #repo/image
20+
imagePullPolicy: IfNotPresent #Always pull image
21+
env:
22+
# If there's a service named 'redisinsight' that exposes the
23+
# deployment, we manually set `REDISINSIGHT_HOST` and
24+
# `REDISINSIGHT_PORT` to override the service environment
25+
# variables.
26+
- name: REDISINSIGHT_HOST
27+
value: "0.0.0.0"
28+
- name: REDISINSIGHT_PORT
29+
value: "8001"
30+
volumeMounts:
31+
- name: db #Pod volumes to mount into the container's filesystem. Cannot be updated.
32+
mountPath: /db
33+
ports:
34+
- containerPort: 8001 #exposed conainer port and protocol
35+
protocol: TCP
36+
livenessProbe:
37+
httpGet:
38+
path : /healthcheck/ # exposed RI endpoint for healthcheck
39+
port: 8001 # exposed container port
40+
initialDelaySeconds: 5 # number of seconds to wait after the container starts to perform liveness probe
41+
periodSeconds: 5 # period in seconds after which liveness probe is performed
42+
failureThreshold: 1 # number of liveness probe failures after which container restarts
43+
volumes:
44+
- name: db
45+
emptyDir: {} # node-ephemeral volume https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
46+

k8s-docs/redis-connect/.DS_Store

6 KB
Binary file not shown.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
##################################################################################################
2+
##### Properties to start a Redis Connect cluster. Default values are commented out. #####
3+
##################################################################################################
4+
5+
##### Cluster properties
6+
#cluster.name=default
7+
#cluster.leader.heartbeat.lease.renewal.interval=5000
8+
#cluster.election.attempt.interval=5000
9+
#cluster.timeseries.metrics.enabled=false
10+
11+
##### Job Manager Services properties
12+
#job.manager.services.enabled=true
13+
#job.manager.services.threadpool.size=2
14+
#job.reap.attempt.interval=7000
15+
#job.claim.service.enabled=true
16+
#job.claim.attempt.interval=5000
17+
#job.claim.batch.size.per.attempt=4
18+
#job.claim.max.capacity=4
19+
#job.claim.heartbeat.lease.renewal.interval=10000
20+
21+
##### REST properties
22+
#rest.api.enabled=true
23+
rest.api.port=8282
24+
25+
##### Job Manager Database properties
26+
redis.connection.url=redis://redis-meta.demo.svc:15778
27+
#redis.connection.sslEnabled=false
28+
#truststore=<path_to_JKS>
29+
#keystore=<path_to_PKCS>
30+
#redis.connection.insecure=false
31+
#redis.connection.timeout.duration=5
32+
#redis.connection.auto.reconnect=true
33+
#redis.connection.suspend.reconnect.on.protocol.failure=true
34+
35+
##### Credentials properties
36+
credentials.file.path=/opt/redislabs/redis-connect/config/samples/credentials
37+
#credentials.rotation.event.listener.enabled=false
38+
#credentials.rotation.event.listener.interval=60000

0 commit comments

Comments
 (0)