This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sentinel StatefulSet : Redis High availability with Sentinel on Kubernetes(K8s) | |
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
name: sentinel | |
namespace: redis | |
spec: | |
serviceName: sentinel | |
replicas: 3 | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# StatefulSet for Redis High Availability with sentinel | |
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
name: redis | |
namespace: redis | |
spec: | |
serviceName: redis | |
replicas: 3 | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: redis-config | |
namespace: redis | |
data: | |
redis.conf: | | |
# Redis High availability with Sentinel on Kubernetes(K8s) configurations | |
# ----------------------------------------------------------------------- | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: eksctl.io/v1alpha5 | |
kind: ClusterConfig | |
metadata: | |
name: aws-lab # name Of the clutser we want to use. | |
region: ca-central-1 # Region in which cluster need to be created | |
nodeGroups: | |
- name: ng-1 # Node group Name | |
instanceType: t3.medium # EC2 instance Type. "t3.medium" or above is required. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: redis | |
namespace: redis | |
spec: | |
clusterIP: None # "None" make it a headless service. No cluster IP. | |
ports: | |
- port: 6379 | |
targetPort: 6379 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
name: redis | |
namespace: redis | |
spec: | |
serviceName: redis | |
replicas: 6 # 6 replicas, 3 master and 3 replicas(slaves) | |
selector: | |
matchLabels: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: redis-acl | |
namespace: redis | |
data: | |
users.acl: | | |
# user "default" is the default user ( act as admin ) and user "replication" is used by the nodes for the replication. | |
user default on #8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 ~* &* +@all | |
user replication on #65cf6f5f48186a4a6c5de02f156f1642b3873451d9de1607147799023dbf4ef8 +psync +replconf +ping |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: redis-config | |
namespace: redis | |
data: | |
redis.conf: | | |
# important configurations | |
# ------------------------ |
NewerOlder