In the course Jenkins Project: Building CI/CD Pipeline for Scalable Web Applications, the second last module is on Kubernetes and there is one lab at the end of the module

In the course Jenkins Project: Building CI/CD Pipeline for Scalable Web Applications, the second last module is on Kubernetes and there is one lab at the end of the module.
A Jenkins Pipeline integrated with Kubernetes needs to be deployed. This is the 10th (last step) of the lab. I have followed everything as mentioned in the solution and the documentation in the given git repository.
The Jenkins Pipeline kept failing with the error message stating configMap not found at k8s.io.
There is something missing about configMap in the provided solution.
In the github link - amazon-elastic-kubernetes-service-course/docs/nodes.md at main · kodekloudhub/amazon-elastic-kubernetes-service-course](amazon-elastic-kubernetes-service-course/docs/nodes.md at main · kodekloudhub/amazon-elastic-kubernetes-service-course · GitHub
there is a configMap, for mapRoles, username do we need to replace ‘EC2PrivateDNSName’ with actual EC2PrivateDNSName found under EC2 section of the AWS console?
There is a Jenkins credential kubeconfig of type secret file asked to be created at step 10.
Do we need to add this actual configMap file to the Jenkins credential?

Hi @DevOps2

You’re working on a lab, correct? Could you please share the lab link?

Jenkins Project: Building CI/CD Pipeline for Scalable Web Applications | KodeKloud

Hi @DevOps2

I’ve just checked it and it’s worked properly from my end, was you able to run the jenkins job sucessfully?

Hello,
Thank you for checking and the fast reply.
I am new to DevOps.
I followed the steps in the ‘Solution tab’ of the 10th question and the job first failed as the stage to remove the jenkins-project directory was missing in the already existing Pipeline.
After I added that stage, then I got the error telling that the configMap is missing.
Below are my questions:
1.) What is the path of the above output on the right, is it HOME/kube/.config?
2.) What are the additional steps you performed which are not present in the solution?
3.) In the Github link mentioned in my initial question, there is a yaml file for configMap, for mapRoles, username, do we need to replace ‘EC2PrivateDNSName’ with actual EC2PrivateDNSName found under EC2 section of the AWS console?
There is a Jenkins credential kubeconfig of type secret file asked to be created at step 10.
Do we need to add this actual configMap file to the Jenkins credential as Secret file?
4.) Do we need to add the AWS access key and AWS secret key as well (both as Secret text) to the Jenkins credentials?
The second question above tells that there are some parts of the solution missing from the actual solution to the task needed to be performed at step 10.
If you could please share briefly about what additionally you did which is not present in the Solutions tab, it would be of great help.

Hi @DevOps2

  1. You can get it from the terminal lab by running:
cat ~/.kube/config
  1. I’ve followed all the steps in the Solution tab — maybe it wasn’t very clear for you.
  2. Yes, you need to do that to be able to add the nodes to the cluster.
  3. Yes, of course, you can find it in the terminal lab under ~/.aws.

Please let me know if you still have any questions.

Thanks.
That should be all.