Unable to connect to the server: x509: certificate signed by unknown authority while installing dashboard

Getting "Unable to connect to the server: x509: certificate signed by unknown authority" while installing dashboard using kubectl create -f ``` kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/deploy/recommended/kubernetes-dashboard.yaml```. Cluster is working fine otherwise:(. Please help.