Scenario 1:
You are trying to push the changes to remote github repository using below command and it keeps failing with the error:
$ git push origin master error: src refspec master does not match any error: failed to push some refs to 'https://github.com/subudear/infra.git'
Solution:
There are lots of reasons for this error BUT the simplest is the one where we are trying to push to master branch whereas there is no such branch rather it is main. Our mind is tuned to consider everything quite complex though it is not the case always. Fixed command is
git push origin main
Scenarios 2:
You have created fresh new AWS EKS cluster using AWS management console-
You are excited to connect to control plane using kubectl BUT then it starts giving this error
$ kubectl get svc error: You must be logged in to the server (Unauthorized)
Solution:
There are a number of reasons for this error BUT again the silliest one is related to the user used to create the cluster. Check the AWS Management Console on right side top highlighted in Yellow in above screen shot. Make sure you configure the AWS Access Key ID and AWS Secret Access Key for this user on the server where kubectl is running. Some times we have 2 users and both are administrator so it doesn’t strike that we are using wrong user to access the cluster.