N
N
Nastya19202021-12-13 08:06:09
go
Nastya1920, 2021-12-13 08:06:09

How to access webhook-server in Postman?

The platform is based on Kubernetis.
Service Y, sitting in our cluster, has webhooks and corresponding registered endpoints. The launched webhook server runs on port 4001.

Problem: the architect asks to open additional endpoints (go profiler pprof) - and for this, reuse the same server on the same port.

In main.go I write:

my := http.NewServerMux()
my.HandleFunc("/debug/pprof/profile", pprof.Profile)
http.ListenAndServe(":4001", my)

Service Y in charts has a webhook.yaml (kind: Service), which specifies the webhook service name and port (port==targetPort==4001)

However, when I start the cluster on dev landscape (similar to staging) and try to call the webhook server url https://..svc.cluster.local:4001/debug/pprof/profile from Postman or browser - server not found, no response at all

What am I missing? Perhaps something else needs to be added/configured to access the webhook server this way?

Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question