I am trying to run kubectl get pods command inside Docker conatiner. But it is showing me the below error.
jenkins@f3460123b771:/root/.kube$ kubectl get pods
The connection to the server localhost:8080 was refused - did you specify the right host or port?
How can I solve this error?