Create Replicaset in Kubernetes Cluster -- Failed

Hi @Inderpreet, @kodekloud-support3 @Ayman

My task was to “Create a ReplicaSet using httpd image and name it as httpd-replicaset. and
Labels app should be httpd_app, labels type should be front-end and the container should be named as httpd-container. Make sure replicas counts are 4.”

I did accordingly as per below screenshot but it evaluated as failed

Create Replicaset in Kubernetes Cluster-2

Cloud you please have a look and inform me, what went wrong?

Any clue from other experts.

Hello, ahmedkuet
Can i look into your replicaset manifest file?

Sorry, I didnt save the replicaset manifest file but I copied it from Kubernetes doc and changed the name and labels.

As per my understanding you haven’t specified “app” labels in the selector. Only label “type” is shown in the shared images.

@Tej-Singh-Rana, Selector field is used to to select which pod will be under this replica set. So its important to match with POD labels. Selector has no influence with replicaset Labels. Question asked to labels replicaset which I did accordingly.

I knew that means. Actually i am just giving my opinion on behalf of failed message, because in the message its pointed out about matchLabels so you also knew that where it comes.

@Tej-Singh-Rana, Thats fine mate. Thank you and I appreciate your help throughout the forum.

Yeah, i just share my opinion. Might be a question is a bit distracted or tricky. Wait for a KKE support. May be they will mark as success for this task and do changes in the question descriptions for upcoming candidates.

@ahmedkuet thanks for reporting this, this is marked Success for you and we have fixed this issue.

@Inderpreet Thank you.
I also noticed that, system have some writing privileges issue which shows “permission denied” like:

thor@jump_host /$ sudo kubectl create deployment asd --image=nginx --dry-run=client -o yaml > dep.yaml
bash: dep.yaml: Permission denied

the dep.yaml file is beeing created at /, which is writable only for root user. Create this file on ~ (/home/thor) and you’ll have no permission problems.

@francilio Yes, you are right. I will check next time.

1 Like