DATABASE_URL. The copy happens inside the cluster, and Ankra never sees the values. An application on another cluster is not connected for you: give it the values yourself, as in Connect from another cluster.
How your application receives the connection
Every application environment a service was set up for, on the service’s cluster, receives the service’s connection on the application’s next deploy:- The deploy adds a Secret named
<service>-connectionto the application’s namespace, with<service>standing for the service name. Ankra copies its values inside the cluster from the service’s own credentials Secret. - Every container and init container of the application’s Deployments, StatefulSets and DaemonSets reads that Secret through
envFrom, so each of its keys becomes an environment variable. The names are listed under Variable names.
The same state is in the API, on each of
consumers in Get a managed service instance, as connection_delivery with the secret_name, the variables the application receives and a reason.
A workload annotated ankra.io/deploy-overrides: "none" keeps the manifest you committed, so it gets no envFrom reference. The <service>-connection Secret is still written to its namespace: reference it from the workload yourself. Jobs and CronJobs are not given the reference either.
When a service is deleted, the application’s next deploy removes its <service>-connection Secret and the reference to it.
Variable names
Each service delivers the variables its kind of client conventionally reads:
Every service also delivers each variable under its own prefix: the service name in capitals, with hyphens as underscores. A PostgreSQL service named
orders-db delivers ORDERS_DB_DATABASE_URL, ORDERS_DB_PGHOST and so on.
The names without a prefix go to one service of each kind per application environment: the one set up first. An application with one database reads DATABASE_URL. When a second PostgreSQL service is added for the same environment, DATABASE_URL keeps pointing at the first, and the second is read through its prefixed names only. Valkey and any other Redis-compatible service count as one kind, as they share REDIS_URL.
Find the connection details
Open the service in My services. Its Connect section shows:- the namespace, which is the service name;
- each address, with a Copy button;
- the name of the Secret that holds the credentials;
- for each key in that Secret, a command that prints its value, with a Copy button.
connection on Get a managed service instance: the namespace, the named endpoints and the secret with its name and keys. They follow a fixed pattern for each service, below, with <service> standing for the service name.
Addresses and Secrets
The addresses resolve from any namespace on the service’s cluster, and not from outside it. On a cluster with a custom DNS domain, use the shorter
<name>.<service>.svc form, for example valkey.<service>.svc:6379. The delivered variables use the full svc.cluster.local form, so on such a cluster their addresses do not resolve and automatic delivery does not work yet: give the application the short-form values yourself, as in Connect from another cluster, under variable names the delivery does not use.
Read a value
You need a value only to connect something Ankra does not connect for you. Select the service’s cluster, then read the Secret by name with--reveal, using the Secret and namespace from the table:
--reveal, every value comes back as a sha256: digest. --reveal needs the kubernetes.secrets_reveal permission on the cluster, which the operator, admin and owner roles carry, and every reveal is recorded in the organisation’s audit log. Values under data stay base64-encoded.
For a PostgreSQL service named orders-db, this prints its password:
ca.crt, works the same way:
Connect from another cluster
An application on another cluster than the service is not connected for you, and the service’s addresses do not resolve there. Reaching the service from another cluster needs a network path between the clusters that you provide, and the address that path exposes. Give the application the values as environment secrets, from the service page’s Use it in <application> button, which opens the application’s Settings › Secrets, or from the CLI. Piping the value keeps it out of your shell history:env-secrets apply seals the stored values into the application’s deployments and rolls them. The URL keys, such as PostgreSQL’s fqdn-uri, name the in-cluster address, so build the URL your application uses from your own network path’s address rather than copying them.
For a workload that is not an Ankra application, keep the Secret in Git and encrypt it with SOPS.
A value you copy this way is yours: deleting the service does not remove it from the application. Delete it yourself once the application no longer uses the service.
Notes per service
- PostgreSQL.
DATABASE_URLandJDBC_DATABASE_URLcarry the operator’sfqdn-uriandfqdn-jdbc-uri. The operator also writesuri,jdbc-uriandhostkeys, but they name the short hostpostgresql-rw, which resolves only inside the service’s own namespace. You connect asapp, the owner of the databaseapp, and superuser access is off. The read-only address reaches replicas only, so it answers only wheninstancesis above 1, and no variable names it. The image includes the pgvector and pgaudit extensions. - Valkey. Authenticate as the
defaultuser with the password;REDIS_URLis a completeredis://URL. Write to the primary address. The read-replicas address serves reads from every pod. - NATS. Connect as
app.NATS_URLcarries no credentials, so passNATS_USERandNATS_PASSWORDseparately. JetStream is on; memory-backed streams are disabled. - OpenSearch. Use HTTPS with basic auth as
admin, the only user. The certificate is signed by a private CA generated in the cluster: have your client trustOPENSEARCH_CA_CERT, which holds that CA’s certificate. - SeaweedFS. Use the S3 API over plain HTTP inside the cluster, with path-style addressing. The admin key pair, the one delivered, can read, write, list and administer buckets. The read-only key pair can only read, and is in the service’s Secret only.
- VictoriaLogs. Send logs over HTTP with basic auth, as JSON lines, Loki push, OpenTelemetry or Elasticsearch bulk, and query them with LogsQL. No log collector is installed, so ship logs with your own agent.
- VictoriaMetrics. Push metrics with basic auth using Prometheus
remote_write, OpenTelemetry, InfluxDB or another supported protocol, and query with PromQL or MetricsQL on the Prometheus HTTP API. It scrapes nothing itself, so push from vmagent, a Prometheus agent or an OpenTelemetry Collector.
Check that the service answers
A finished deployment is not yet a ready service. The service’s Service health section says whether its workload runs as planned, which does not prove a client can connect. Ankra checks that a client can connect for every service it publishes, about every five minutes, and shows the result as the service’s Readiness: see Health and readiness. Until readiness reads Ready, or while it reads Not verified because the cluster’s agent is too old to run the check, check the service yourself before you rely on it. Its pods run in its namespace:Ready condition is True:
app.kubernetes.io/name=ankra-postgres-connection-test for PostgreSQL, and app.kubernetes.io/name=ankra-service-canary for every other service. That is Ankra’s readiness check, which connects the way an application would; it is deleted when it finishes.
Next steps
Managed service settings
What each setting changes, with its range and default.
Managed services
How the services run, their health and readiness, and their current limits.
Delete a managed service
What deleting removes and keeps, and how to confirm it.