Kubernetes Pod Can’t connect to DeepGram but works locally perfectly #1030
Replies: 2 comments
-
Thanks for asking your question. Please be sure to reply with as much detail as possible so the community can assist you efficiently. |
Beta Was this translation helpful? Give feedback.
-
Hi @Hemendra05, are you receiving an error message with a request ID from Deepgram? Or does the request fail before reaching Deepgram? You mention that even
Do you have any other networking restrictions in place on your pod? |
Beta Was this translation helpful? Give feedback.
-
I'm banging my head against a wall with a network issue and hoping someone here can offer some insight. I've got an application that uses the Deepgram SDK for real-time transcription. It works flawlessly on my local machine, but when I deploy it as a pod in my Kubernetes cluster, it just… stops working.
Here's the breakdown:
Local: Everything's perfect. Audio streams in, transcripts come out.
Kubernetes: The pod receives the audio bytes input. No errors in my application logs related to authentication or API keys, after connection its also printing log for successful connection. Issue come when sending the bytes chunks to the DeepGram, it never happened.
I've tried a few things already:
Basic connectivity checks: Inside the pod, nslookup api.deepgram.com resolves correctly. I can even curl -v https://api.deepgram.com/, and get a 200 OK, which tells me basic HTTP traffic is going out.
Deepgram SDK/Socket API: Initially, I was using the Deepgram SDK. Thinking it might be an SDK issue, I tried working directly with WebSockets, but I get the same behavior: the connection gets closed immediately after the request.
Resource limits: I've checked CPU and memory limits on the pod; they're nowhere near being maxed out.
I'm clueless now about the issue. I'm attaching the code as well, if that makes sense.
Local Python Version:
Python 3.11.4
Docker Python Image:
python:3.11-slim
Kubernetes Version:
1.29.0
Kubernetes Ingress Annotations:
Code:
Thanks in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions