Deploy Drupal App on Kubernetes

I got this marked as failed when I got the correct password setup , Can anyone help me understand why ?
image


I validate the secret contains the correct value
kubectl get secret drupal-mysql-secret -o jsonpath=“{.data.MYSQL_ROOT_PASSWORD}” | base64 --decode

@Inderpreet , @Ayman , @KodeKloud2, @kodekloud-support3

Can you please check why this task was marked as failed?

@rahul456 Can you please help me?

Hello, @devops503
Did you made any changes after submitting the task? KKE team will look into it.

I am not sure about the difference but it is giving different encoded value when using echo -n …

In your review video you have used [ echo root_password | base64 ] to encode mysql password; but in many examples I have seen [ echo -n ‘root_password’ | base64 ] … I have checked on a test system and it returns different encoded value with -n switch.

[root@2f8c814b7db7 ~]# echo root_password | base64
cm9vdF9wYXNzd29yZAo=

[root@2f8c814b7db7 ~]# echo -n ‘root_password’ | base64
cm9vdF9wYXNzd29yZA==

1 Like

I have checked; When you use the echo statement, a newline is added at the end of the command.
some shell implementations use echo -n message to tell echo not to append a newline.

1 Like

No I didnt just validate the root_password was correct
When I ran this
drupal-mysql-secret -o jsonpath=“{.data.MYSQL_ROOT_PASSWORD}” | base64 --decode
I got
root_password

Thanks @irfan.salam I’ll definitely need to try that

Thanks a lot @irfan.salam ! the echo -n definitely helps

This time I login the container to try the credentials

1 Like

Hello @Inderpreet @kodekloud-support3

I have assigned that task today and it fails, I have passed it already in game of pods and it works
I’ve no error msg, could you please check it for me, I’ll be greatful if u check it today cause I don’t want to lose tomorrow task please
Hope U answer me quickly guys :slight_smile:
Review link : KodeKloud Engineer | Real Project Tasks on Real Systems
Best regards

hi @Goldenor, sorry for the issue, this is marked success for you.

thanks @rahul456 could u please assign to me another task for today, cause it will be taken as today’s task and I’ll lose my place in the leaderboard
Best regards