termal.in

← Blog

Reach Kubernetes internal services without an Ingress or a VPN

· Termalin Team kubernetesconnectordockerinternal-sitesdevops

You want to open a cluster-internal dashboard — Grafana on grafana.monitoring.svc:3000, an admin UI, a ClusterIP database — from your laptop or hand it to an AI agent. The services have no public address on purpose, and you’d rather not stand up an Ingress with TLS and auth, expose a LoadBalancer, or make everyone join a VPN just to see one panel. Run the Termalin Connector as one replica inside the cluster, and reach those services by their cluster DNS name through a signed-in browser tab or over MCP — nothing exposed, nothing to route in.

Why not an Ingress, a LoadBalancer or a VPN

Each of the usual answers is more machinery than “let me see Grafana for a minute”:

  • An Ingress means a controller, a public hostname, a certificate and an auth layer in front — real work to stand up and to keep private.
  • A LoadBalancer is a public IP and a cloud bill per service, and now the thing is on the internet.
  • A VPN or kubectl port-forward works for you at a terminal, but it’s a client on every device and a hard sell for a teammate or an agent that only speaks HTTP.

The Connector takes a different shape: a pod that dials out to Termalin and resolves service names through the cluster’s own DNS. No Service of its own, no inbound anything.

One replica, a Secret, a tiny PVC

apiVersion: v1
kind: Secret
metadata: { name: termalin }
stringData: { token: "<token>" }
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata: { name: termalin-data }
spec:
  accessModes: [ReadWriteOnce]
  resources: { requests: { storage: 16Mi } }
---
apiVersion: apps/v1
kind: Deployment
metadata: { name: termalin-connector }
spec:
  replicas: 1
  strategy: { type: Recreate }
  selector: { matchLabels: { app: termalin-connector } }
  template:
    metadata: { labels: { app: termalin-connector } }
    spec:
      securityContext: { runAsUser: 10001, runAsGroup: 10001, fsGroup: 10001, runAsNonRoot: true }
      containers:
        - name: connector
          image: ghcr.io/termalinapp/termalin-connector:0.2.3
          env:
            - { name: TERMALIN_TOKEN, valueFrom: { secretKeyRef: { name: termalin, key: token } } }
            - { name: TERMALIN_TARGET, value: "10.0.12.7:22" }
            - { name: TERMALIN_NAME, value: "k8s-prod" }
          securityContext: { readOnlyRootFilesystem: true, allowPrivilegeEscalation: false, capabilities: { drop: [ALL] } }
          resources: { requests: { cpu: 10m, memory: 16Mi }, limits: { memory: 64Mi } }
          volumeMounts: [{ name: data, mountPath: /data }]
      volumes:
        - { name: data, persistentVolumeClaim: { claimName: termalin-data } }

It’s an unassuming workload: the token comes from a Secret, the enrolment persists in a 16 Mi PVC at /data, and it runs as a non-root user (uid 10001) with a read-only root filesystem, all capabilities dropped, and tight resource limits. There’s no Service, no Ingress, no annotation — nothing to point traffic at, because all the traffic is outbound.

Reach a service by its cluster DNS name

Internal web UIs don’t go through SSH. The backend asks the Connector to open a connection to the service’s own address, and the pod resolves it through the cluster’s DNS:

http://grafana.monitoring.svc:3000

Add that as an internal site in the cabinet and it opens in a browser tab at a private termal.ink address — for you, signed in, and for people you invite by email. WebSockets pass through, so Grafana’s live panels behave as they do in-cluster. The same works for any ClusterIP service: an Argo CD or Kiali UI, a Kafka console, an internal admin panel.

The address just has to resolve to a private one (a ClusterIP is in your service CIDR, so it does) — RFC 1918, loopback, link-local, CGNAT 100.64/10, IPv6 ULA are allowed; public addresses and cloud metadata addresses are refused by design.

Databases, with or without a shell

Two cases, and only one needs an SSH server in the cluster:

  • With a password. A Postgres or MySQL ClusterIP service is a dial target like any other, so you can reach it from the cabinet’s database client with its password — postgres.data.svc:5432 — no Ingress, no port-forward.
  • Passwordless. The passwordless data_query / data_tables MCP tools, a terminal, ssh_exec, SFTP, metrics and backups all need an SSH server on the TERMALIN_TARGET and the sign-in line in its authorized_keys. The image ships no sshd of its own, so point TERMALIN_TARGET at a node or a pod that runs one if you want a shell too.

Let an agent reach the cluster, bounded

The same pod lets an AI agent work the cluster through the hosted MCP endpoint. It can create an internal site for a dashboard (web_link_create), run commands on the SSH target bounded by a per-Connector command policy (full, allowlist or read-only), and everything lands in an audit log — no key handed out, no kubeconfig in the model’s context. The custody model is on the SSH for AI agents page.

The two rules that keep it sane

  • One replica per enrolment. Keep replicas: 1 and strategy: Recreate. Two pods on the same volume would be the same Connector twice. If you need to reach several SSH targets, run a second Deployment with its own enrolment, not a second replica.
  • The container never updates itself. Pin a tag (:0.2.3 above, not :latest) and update by rolling the Deployment to a new tag — kubectl set image … or a bump in Git. The PVC keeps the enrolment, so it reconnects as the same Connector; the cabinet shows no “Update now” for it.

The same image elsewhere

This is one shape of the Connector in Docker. On a home network, the same ~4 MB image is one container that reaches your whole LAN; in AWS, an ECS task can replace a bastion host in a VPC. The underlying idea — a private network reached by an outbound-only agent, no inbound port — is the same one in SSH behind NAT without port forwarding.


Termalin is a free, cross-platform SSH client with internal sites, a web terminal and a keyless Connector — download it, or read the Connector in Docker. The Connector needs Pro or the 14-day trial.

Try it on one host.

Termalin is a fast SSH client for you — and your agents.

Free tier · 14-day Pro trial · pricing

Add Termalin as a preferred source on Google