Access and TLS
Configure access under spec.access on the high-level Valkey resource.
Service types
For Cluster architecture, the same-name bootstrap Service remains ClusterIP;
the requested external type is used by generated per-Pod Services. For Failover
and Replica, the read-write and read-only role Services use the requested type,
and external access can also create per-Pod Services. Always inspect the
generated Services instead of assuming one uniform Service shape.
For NodePort in 2.0.0, leave spec.access.ports unset unless the delivered build
documents a validated format. Kubernetes then allocates ports. The source
baseline contains conflicting schema and runtime formats for fixed assignment.
Switch access type with a merge patch:
Wait for all external addresses and the Valkey phase to become ready before
updating clients.
In-cluster Service names
For Cluster architecture, use the Service with the same name as the Valkey
resource and a Cluster-aware client:
For Failover and Replica architectures, use the read-write or read-only Service:
The read-write Service selects the current primary. Applications must reconnect after failover. The read-only Service selects replicas and can return stale data.
Discover the actual Services instead of constructing names in automation:
Internet Protocol family
Set spec.access.ipFamilyPrefer to Internet Protocol (IP) version 4 (IPv4) or
version 6 (IPv6). The generated Services use a single-stack IP family policy.
Ensure the cluster, nodes, load balancer, DNS, and clients support the selected
family before changing an existing instance.
Enable TLS
TLS requires cert-manager and an existing Issuer or ClusterIssuer. The
Operator creates a cert-manager Certificate and stores the issued material in
<instance-name>-tls.
Verify certificate issuance and the rolling update:
The generated Valkey arguments retain upstream client-certificate
authentication. A TLS client therefore needs the trusted certificate authority
(CA), a trusted client certificate, and its private key. The instance Secret
must contain ca.crt, tls.crt, and tls.key; confirm that the selected
cert-manager issuer populates all three keys.
Use a client identity issued by the same trusted CA. The following form avoids putting an access control list (ACL) password on the command line, but it checks only the Cluster bootstrap connection:
valkey-cluster.default is present in the Operator-generated Cluster
certificate for this example; valkey-cluster.default.svc is not. Inspect
Certificate.spec.dnsNames and use an exact listed name. The generated Secret
contains the server identity used internally by the Operator; do not distribute
its private key to applications as a general client credential. Issue and
distribute dedicated client certificates through an approved certificate
process.
The generated certificate does not include arbitrary NodePort or LoadBalancer
addresses. For Cluster, it also omits the per-Pod Service names or addresses
announced for redirection. A successful bootstrap PING therefore does not prove
that a Cluster-aware client can validate redirected connections. Require a
delivered build that aligns every announced endpoint with a certificate subject
alternative name before production Cluster TLS use. Do not use --insecure as
the workaround.
For end-to-end endpoint discovery, authentication, TLS, and client behavior, see:
See the official Valkey TLS documentation for server and client certificate behavior.