kubernetes endpoints

Jackie
1 min readJul 3, 2020

--

endpoints is normally used behind the scene, without the need of any manual intervention.

However, for local testing, it could become helpful to leverage on the endpoints customization.

for example, with above, if we create a service without any selector (of any pods/deployments), and manually create an endpoint with the same name as the service, then we can configure where the endpoint point to, which could be an external IP address, or maybe to a docker service

like

apiVersion: v1
kind: Endpoints
metadata:
name: svc-to-external-web
subsets:
- addresses:
- ip: 192.168.64.1 # minikube ssh "route -n | grep ^0.0.0.0 | awk '{ print \$2 }'"
ports:
- port: 80

ref: https://theithollow.com/2019/02/04/kubernetes-endpoints/

--

--

No responses yet