Reputation: 137
I understand that pods are isolated into another subnet (POD-CIDR, CNI...) Is that possible to reach a pod (using a tool)? I saw that you can use ClusterIP, LB, Externalname, but I cannot reach my pod's ipaddress.
Upvotes: 1
Views: 376
Reputation: 61
Assuming you have a service defined for your pod (deployment) you can use kubectl to forward local ports to that service. For example:
$ kubectl port-forward redis-service 6379:6379 --namespace=default
This would allow you to access your pod/service through local port 6379
If you are interested in making your pod publicly available, your best resource would be to define an ingress. This will allow you to map a public DNS hostname and path to your internal kubernetes service
Upvotes: 1
Reputation: 72191
that means something is wrong with your networking. Kubernetes imposes the following fundamental requirements on any networking implementation (barring any intentional network segmentation policies):
https://kubernetes.io/docs/concepts/cluster-administration/networking/
Upvotes: 1