Need Help for Redis Cluster Deployment Tasks

@player001 @KodeKloud I am creating a menifests as per the task but still at the end pods are not getting created. I must be missing something in this task. Please Guide. I have created 6 persistant volumes, 1 service and 1 statefulset object which have 6 replicas.

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: redis-cluster
spec:
selector:
matchLabels:
app: redis-cluster
serviceName: “redis-cluster-service”
replicas: 6
template:
metadata:
labels:
app: redis-cluster
spec:

  containers:
  - name: redis-container
    image: redis:5.0.1-alpine
    command: ["/conf/update-node.sh", "redis-server", "/conf/redis.conf"]
    env:
      - name: POD_IP
        valueFrom:
          fieldRef:
            fieldPath: status.podIP
    ports:
    - containerPort: 6379
      name: client
    - containerPort: 16379
      name: gossip
    volumeMounts:
    - name: conf
      mountPath: /conf
      readOnly: false
    - name: data
      mountPath: /data
      readOnly: false
  volumes:
  - name: conf
    configMap:
      name: redis-cluster-configmap
      defaultMode: 0755

volumeClaimTemplates:

  • metadata:
    name: data
    spec:
    accessModes: [ “ReadWriteOnce” ]

    resources:
    requests:
    storage: 1Gi

apiVersion: v1
kind: Service
metadata:
name: redis-cluster-service
labels:
app: redis-cluster
spec:
selector:
app: redis-cluster

ports:
- name: client
protocol: TCP
port: 6379
targetPort: 6379
- name: gossip
protocol: TCP
port: 16379
targetPort: 16379

apiVersion: v1
kind: PersistentVolume
metadata:
name: redis-pv-01
spec:
storageClassName: manual
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
hostPath:
path: “/redis01”

Hello @pratikshag
Can you please specify the lab name and question number so that i can help you.

@KodeKloud This isn’t a lab question. It is one of the devops engineer task.