I have created a pod using kubectl.
I want to connect to the endpoint of this pod. How to do that using kubectl?
You can do port forward to access the pod from your local system
kubectl port-forward pods/redis-master-765d459796-258hz 7000:6379
https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/
Or You can get a shell in the running container
kubectl exec -it pods/shell-demo -- /bin/bash
https://kubernetes.io/docs/tasks/debug-application-cluster/get-shell-running-container/