To connect to k8s API, first exec into a pod and use the service account token in the Authorization header of your API call.
➜ k -n project-swan exec pod1 -it -- sh
➜ / # TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
➜ / # curl -k https://kubernetes.default/api/v1/secrets -H "Authorization: Bearer ${TOKEN}"