Self-hosted AI on Kubernetes: which model servers are exposed? A checklist
Would rather we looked for you? We run a free one-time audit scan of one cloud account and go through the results with you. No charge, no commitment.
Free audit scanSelf-hosted AI on Kubernetes rarely arrives as one project. It is a model server here, a vector database there, a notebook someone started for a demo, and an operator that creates Services you never wrote. Each tool has its own port and its own idea of authentication. This checklist covers eleven of them, with the commands to find each one and the one fix that matters most.
Every default below comes from the project's own documentation or repository, linked in each section and read on 28 November 2026. Defaults change between versions, so check the version you run. Run the probe commands only against clusters you own or are authorised to test.
What an attacker sees (a hypothetical)
A thought experiment, not an incident. Someone gets a shell in one pod of your cluster. Kubernetes pods accept traffic from any other pod unless a NetworkPolicy says otherwise: "By default, a pod is non-isolated for ingress; all inbound connections are allowed" (Kubernetes docs). So they sweep a short list of ports:
- 11434 answers with a list of models (Ollama).
- 6333 answers with a list of collections (Qdrant). Those collections hold embeddings of your documents.
- 4000 answers
/v1/modelswithout a key (LiteLLM with no master key), and every call it forwards spends against your provider API keys. - 8265 is a Ray dashboard. Ray's own docs say anyone who can reach it "can execute arbitrary code" on the cluster.
No exploit was needed for any of it. Each answer is the documented API doing its job. The rest of this page is how to make sure your cluster gives that person nothing.
The exposure table
| Tool | Default port | Authentication out of the box | If someone reaches it | The one fix |
|---|---|---|---|---|
| Ollama | 11434 | None on the local API; official image listens on 0.0.0.0 | List, run, pull, create and delete models | NetworkPolicy to named clients; authenticating proxy for anything wider |
| vLLM | 8000 | Off until --api-key or VLLM_API_KEY; even then it covers only /v1, /v2, /inference and /cohere | Inference through /invocations; /pause and /update_weights without a key | Reverse proxy that allowlists endpoints, plus the API key |
| LiteLLM proxy | 4000 | Unauthenticated when no master key and no JWT or OAuth2 is set | Spend on your provider keys; admin routes | Set LITELLM_MASTER_KEY (starts with sk-) |
| Jupyter Server | 8888 | Token on by default; can be switched off | Run arbitrary code | Never ship an empty token and password |
| MLflow tracking server | 5000 (binds 127.0.0.1) | Off unless started with --app-name basic-auth | Read and change experiments, runs and models | mlflow server --app-name basic-auth |
| Qdrant | 6333 HTTP, 6334 gRPC | Off until you set an API key | Read, overwrite or delete collections | QDRANT__SERVICE__API_KEY |
| Milvus | 19530 (metrics 9091) | authorizationEnabled: false; root password Milvus | Read, write and drop collections | Enable authorization and change the root password |
| KServe | Istio ingress gateway | Added through the service mesh | Call models behind the gateway when no policy is in place | Namespace AuthorizationPolicy, JWT on external traffic |
| KubeRay (Ray) | 8265 dashboard, 10001 client, 6379 GCS | Token auth exists from Ray 2.52.0; check it is on | "Execute arbitrary code" on the cluster | authOptions: mode: token |
| NVIDIA NIM | 8000 in the quickstart | No client API-key setting found; mTLS available | Inference on your GPUs | NetworkPolicy plus mTLS or an auth gateway |
| Seldon Core 2 | seldon-mesh Service | Delegated to your mesh or gateway | Call any model or pipeline | Mesh authentication; no public LoadBalancer |
The sections below give the source for each row.
Step 1: Find them
These commands are read-only. Run them with a kubeconfig that can get and list across namespaces.
# Pods by image (catches Services with unexpected names or ports)
kubectl get pods -A -o custom-columns='NAMESPACE:.metadata.namespace,POD:.metadata.name,IMAGE:.spec.containers[*].image' | grep -i -E 'ollama|vllm|litellm|jupyter|notebook|mlflow|qdrant|milvus|nvcr.io/nim|rayproject|seldon|kserve'
# Services by the default ports in the table
kubectl get svc -A -o custom-columns='NAMESPACE:.metadata.namespace,NAME:.metadata.name,TYPE:.spec.type,PORT:.spec.ports[*].port,TARGET:.spec.ports[*].targetPort' | grep -E 'NAMESPACE|11434|8000|4000|8888|5000|6333|6334|19530|8265|10001'
# Anything reachable from outside the cluster
kubectl get svc -A | grep -E 'LoadBalancer|NodePort'
kubectl get ingress -A
# Operator-managed AI (an empty result means that operator is not installed)
for r in inferenceservices.serving.kserve.io rayclusters.ray.io nimservices.apps.nvidia.com models.mlops.seldon.io; do kubectl get "$r" -A 2>/dev/null; done
# Namespaces with no NetworkPolicy at all
for ns in $(kubectl get ns -o jsonpath='{.items[*].metadata.name}'); do [ -z "$(kubectl get networkpolicy -n "$ns" -o name)" ] && echo "no policy: $ns"; donePorts 8000 and 5000 are common, so expect some matches that are not AI. The image list tells you which ones are.
Step 2: Test them from a pod you did not allow
Start a throwaway pod in another namespace and call each API without credentials. Replace each host with a Service name and namespace from step 1.
kubectl run ai-probe -n default --rm -it --restart=Never --image=curlimages/curl -- sh
# inside the pod:
curl -s -m 5 http://ollama.ai:11434/api/tags
curl -s -m 5 http://vllm.ai:8000/v1/models
curl -s -m 5 http://litellm.ai:4000/v1/models
curl -s -m 5 http://jupyter.ai:8888/api/contents
curl -s -m 5 'http://mlflow.ai:5000/api/2.0/mlflow/experiments/search?max_results=5'
curl -s -m 5 http://qdrant.ai:6333/collections
curl -s -m 5 -X POST http://milvus.ai:19530/v2/vectordb/collections/list -H 'Content-Type: application/json' -d '{}'
curl -s -m 5 http://nim.ai:8000/v1/modelsData coming back without a key is the finding. A 401 or 403 means authentication is on. A timeout means the network blocked you, which is what you want from a pod that has no business there. For Ray, port-forward the head Service and run ray job list --address http://localhost:8265; with token authentication on, Ray's KubeRay guide shows a 401 Unauthorized for a client without the token. For KServe and Seldon, check the mesh policies in the sections below.
Tool by tool: the default, the risk, the one fix
Ollama
Ollama "binds 127.0.0.1 port 11434 by default" (FAQ), but the official image sets OLLAMA_HOST=0.0.0.0:11434 (Dockerfile), and "the local API at http://localhost:11434 does not require authentication" (docs). Anyone who reaches it can list, run, pull, create and delete models. Fix: ClusterIP, default-deny plus an allow rule for named clients, and an authenticating proxy for anything wider. Full walkthrough: how to secure Ollama on Kubernetes.
vLLM
The server starts at port 8000, and --api-key or VLLM_API_KEY turns on key checking (quickstart). vLLM's security guide says the key applies "only for endpoints under the /v1, /v2, /inference, and /cohere path prefixes". Endpoints such as /invocations (the same inference as /v1), /pause, /abort_requests and /update_weights need no key even when one is set (vLLM security). Fix: set the key, and deploy behind "a reverse proxy (such as nginx, Envoy, or a Kubernetes Gateway)" that allowlists only the endpoints your users need, as vLLM's guide recommends. Never set VLLM_SERVER_DEV_MODE=1 in production.
LiteLLM proxy
The proxy listens on port 4000, and the master key "is the proxy admin credential: it authenticates admin API calls and is the Admin UI login password"; it "must start with sk-" (production guide). If UI_PASSWORD is unset, "the master key itself is accepted as the password" for the Admin UI at /ui (Admin UI docs). With no master key and no JWT or OAuth2 configured, LiteLLM's own source describes the proxy as "unauthenticated by configuration" (user_api_key_auth.py). Fix: set LITELLM_MASTER_KEY from a Kubernetes Secret, give applications virtual keys rather than the master key, and keep /ui off public ingress.
Jupyter Server
"Since access to the Jupyter Server means access to running arbitrary code", token authentication "is on by default". It can be switched off by setting c.ServerApp.token = "" and c.ServerApp.password = "", which the docs mark "NOT RECOMMENDED" unless another layer handles access (Jupyter Server security). It listens on 8888 (public server guide). Fix: search your manifests and images for an empty token or password and remove it.
MLflow tracking server
mlflow server serves the UI and REST API "at http://127.0.0.1:5000" (tracking server docs). To accept connections from other pods you set --host 0.0.0.0, and MLflow's docs then say to configure --allowed-hosts and --cors-allowed-origins. Authentication is opt-in: "To enable MLflow authentication, launch the MLflow UI with the following command: mlflow server --app-name basic-auth" (basic auth docs). Without it, anyone who reaches the server can use the REST API to read and change experiments, runs and registered models. Fix: start with --app-name basic-auth and set --allowed-hosts to your real hostnames. If your probe gets a Host-header rejection, that is MLflow's DNS-rebinding guard (network protection), not authentication.
Qdrant
Qdrant uses 6333 for HTTP and 6334 for gRPC (installation). Its security guide is blunt: "By default, all self-deployed Qdrant instances are not secure. They are open to all network interfaces and do not have any kind of authentication configured" (Qdrant security). Anyone who reaches it can read, overwrite or delete your collections, and the embeddings in them. Fix: set QDRANT__SERVICE__API_KEY from a Secret, give query-only services QDRANT__SERVICE__READ_ONLY_API_KEY, and turn on TLS: Qdrant's own config comments warn that sending an API key over an unencrypted channel is insecure.
Milvus
The default config has authorizationEnabled: false and defaultRootPassword: Milvus, and the proxy listens on 19530 (milvus.yaml). The metrics port, 9091 by default, has its own admin authentication setting, also off. Fix: set common.security.authorizationEnabled: true (in Helm values through extraConfigFiles), then change the root password. The docs note that "By default, the root user is created with the password Milvus" (Milvus authentication).
KServe
Traffic from outside the mesh "need[s] to use an Istio ingress gateway as a port-of-entry to InferenceServices". KServe's guide secures them with strict mTLS (PeerAuthentication in STRICT mode), an AuthorizationPolicy that allows only the same namespace, and JWT for external traffic (KServe service mesh guide). In this setup authentication is something you add with mesh policies, so its absence is easy to miss. Fix: check with kubectl get peerauthentication,authorizationpolicy -A that every namespace running InferenceServices has both.
KubeRay (Ray)
Ray's security page says: "If you expose these services (Ray dashboard, Ray Jobs, Ray Client), anybody who can access the associated ports can execute arbitrary code on your Ray Cluster" (Ray security). The KubeRay sample RayCluster declares ports 6379 (GCS), 8265 (dashboard) and 10001 (client). Token authentication exists from Ray 2.52.0. Ray's docs say 2.59 turns it on by default for local clusters and 2.61 extends that to all clusters; on 28 November 2026 the latest release on PyPI was 2.60.1, so check your version (token authentication). Fix: with KubeRay v1.6.0 or newer, add authOptions: {mode: token} to the RayCluster spec; the operator creates the Secret and sets RAY_AUTH_MODE and RAY_AUTH_TOKEN (KubeRay token auth). Ray also says token auth does not encrypt traffic, so never publish 8265 on a LoadBalancer.
NVIDIA NIM
The NIM for LLMs quickstart publishes port 8000, and its curl examples to /v1/models and /v1/chat/completions send no Authorization header (NIM quickstart). NGC_API_KEY is for downloading models from NGC, not for clients. We did not find a client API-key setting on the configuration page; the closest control is NIM_SSL_MODE=MTLS with a CA file "for client verification" (NIM configuration). Fix: treat NIM like Ollama: ClusterIP, a NetworkPolicy to named clients, and mTLS or an authenticating gateway for anything wider.
Seldon Core 2
Seldon creates "a single Service called seldon-mesh" that may be "exposed via a load balancer" (Seldon inference docs). Authentication comes from your environment: Seldon's docs point to service mesh controls or cloud gateways, with an Istio JWT example (Seldon securing endpoints). Fix: run kubectl get svc seldon-mesh -n seldon-mesh. If its type is LoadBalancer, it needs mesh authentication in front, or should be internal.
Step 3: The fix that covers all eleven
Each tool's own authentication is the inner lock. The outer lock is the same for all of them: deny inbound traffic by default in every AI namespace, then allow named clients on named ports. Kubernetes sets the label kubernetes.io/metadata.name on every namespace, so you can allow one by name.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-ingress
namespace: ai
spec:
podSelector: {}
policyTypes:
- Ingress
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-app-to-ai
namespace: ai
spec:
podSelector:
matchLabels:
tier: ai-server
policyTypes:
- Ingress
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: chat-app
ports:
- protocol: TCP
port: 11434
- protocol: TCP
port: 6333Then re-run step 2 from the default namespace. Every curl should time out. One caution from the Kubernetes docs: "Creating a NetworkPolicy resource without a controller that implements it will have no effect." The probe is how you know yours is enforced.
- Inventory
- Pods found by image, Services by port, and KServe, KubeRay, NIM and Seldon resources listed
- Edge
- No AI server on a NodePort, LoadBalancer or unauthenticated Ingress
- Network
- Default-deny ingress in every AI namespace, with named allow rules
- Ollama and NIM
- No built-in client key, so network rules plus a proxy or mTLS
- vLLM
- API key set, and a proxy allowlisting endpoints outside /v1
- LiteLLM
- LITELLM_MASTER_KEY set from a Secret; /ui not public
- Jupyter
- No empty token or password anywhere
- MLflow
- Started with --app-name basic-auth
- Qdrant and Milvus
- API key or authorization on; Milvus root password changed
- Ray
- Token authentication on; dashboard 8265 never public
- Proof
- The probe pod times out from a namespace you did not allow
Where Onam fits (that is us)
Onam's AI security finds self-hosted AI on Kubernetes and checks it for exposure without authentication. It recognises model servers and gateways such as Ollama, vLLM, Text Generation Inference, LiteLLM, llama.cpp and LocalAI; vector databases; notebooks and MLflow; and KServe, KubeRay, NVIDIA NIM and Seldon resources. It connects through a read-only ServiceAccount bound to a get/list/watch ClusterRole (Kubernetes connection guide). What it finds sits in one AI inventory next to cloud AI services on AWS, Azure and Google Cloud, with an AI bill of materials built from SBOMs. AI Security does not read prompt or answer text unless an admin turns on prompt-text detection, which is off by default.
- The honest limit: for self-hosted AI this is inventory and exposure only. Its configuration rules are written but not switched on, so the per-tool settings in the checklist above (master keys, tokens, Milvus authorization) are still yours to check by hand.
Our prices are public: $20 per unit a month for Complete, which includes data security; $14 per unit a month for Posture; and $39 per active developer a month for code security, with a 25-unit minimum. There is no time-limited trial. Instead there is a free plan of up to 25 units with API-based scanning only, and a free one-time audit scan of one cloud account. Finding self-hosted AI on Kubernetes needs a cluster connection, which is on paid plans.
Frequently asked questions
How do I discover self-hosted LLMs running in Kubernetes?
List pods by container image (ollama, vllm, litellm, nvcr.io/nim and so on), list Services by the default ports, and list the KServe, KubeRay, NIM and Seldon custom resources. Images catch servers that run on non-default ports or under unexpected names.
Is the vLLM API exposed without authentication?
By default, yes: key checking starts only when you set --api-key or VLLM_API_KEY. Even then, vLLM's docs say the key protects only /v1, /v2, /inference and /cohere. Endpoints such as /invocations run inference without a key, so put a reverse proxy in front that allowlists endpoints.
How do I secure a LiteLLM proxy?
Set LITELLM_MASTER_KEY (it must start with sk-), store it in a Secret, give applications virtual keys, and keep the /ui Admin UI off public ingress. With no master key and no JWT or OAuth2, LiteLLM runs unauthenticated.
Does Qdrant have authentication by default?
No. Qdrant's docs say self-deployed instances "are open to all network interfaces and do not have any kind of authentication configured". Set QDRANT__SERVICE__API_KEY, use a read-only key for query services, and turn on TLS.
Is an exposed MLflow server a risk?
Yes. Authentication is off unless the server starts with --app-name basic-auth, so anyone who reaches it can use the REST API to read and change experiments, runs and registered models. Turn on basic auth and keep the Service internal.
Is the Ray dashboard safe to expose?
No. Ray's documentation says anyone who can reach the dashboard, Jobs or Client ports "can execute arbitrary code on your Ray Cluster". Turn on token authentication and keep port 8265 internal, reached by port-forward.
Read next
- How do I lock down Ollama step by step?The full Ollama walkthrough: find it, probe it, and the NetworkPolicy that closes it.
- Which Kubernetes RBAC settings let an attacker go further?The bindings that turn one compromised pod into the whole cluster.
- How does Onam find AI in your cloud and clusters?One AI inventory across cloud AI services and self-hosted Kubernetes.
Try it on your own cloud
Start free. The free plan covers up to 25 units of cloud security, with API-based scanning only: posture (CSPM), identity and permissions (CIEM), data stores found through cloud APIs (DSPM checks, no content classification) and AI-SPM. Posture scanning connects through read-only cloud roles, the free plan deploys no agent or scanner, and no card is needed. Register, and the team emails you the login.