This topic describes the available fields of the Tanzu for Valkey on Kubernetes custom resource definition (CRD).
Synopsis
Valkey Standalone
apiVersion: data.tanzu.vmware.com/v1
kind: Valkey
metadata:
name: valkey-standalone
spec:
#### Specify the Valkey Version
# valkeyVersion:
# name: valkey-8.0.2
### Specify valkey commander configuration (Optional)
# valkeyCommanderConfig:
# enabled: true
# image: valkey-commander:1.0.0
# loginSecret: valkey-commander-login-secret
### Specify usual kubernetes related configuration like image pull secrets, resource limits and requests
# kubernetesConfig:
# imagePullSecrets:
# - registry-secret
# resources:
# requests:
# cpu: 101m
# memory: 128Mi
# limits:
# cpu: 101m
# memory: 128Mi
### Specify valkey secret used for Valkey deployment
# valkeySecret:
# name: secret-name
# key: secret-key
#### Set the persistence preference for the valkey
# persistence:
# enabled: true
# type: "rdb"
# keepAfterDelete: true
# storageSize: 3Gi
# accessModes: ["ReadWriteOnce"]
Description
Applying this resource causes the Kubernetes operator to create a StatefulSet
with a single pod and one container. The Valkey pod mounts a persistent volume claim (PVC) if the storage section is added and storage size is mentioned.
You specify Valkey instance configuration properties to Tanzu for Valkey on Kubernetes with a YAML-formatted manifest file. A sample manifest file is provided in valkey.yaml
. For information about deploying a new Valkey instance using a manifest file, see Create and delete Valkey instances
The following list explains the properties that you can set in your Valkey resource.
Metadata
name
Type: string
Required
This is the name of the Valkey instance. It must be unique within a namespace. It cannot be modified after the Valkey instance has been created. The metadata can set the name, namespace, labels, annotations, and more for the Valkey object. For more information, see the Kubernetes documentation.
Example: valkey-sample
Spec
valkeyVersion
Type: string
Required
Default: <latest Valkey release supported>
This is the Valkey version that is used for creating an instance. If the user does not specify a value, the latest supported version is as the default. For example, if Tanzu for Valkey on Kubernetes supports valkey-8.0.2
, valkey-7.2.8
and valkey-7.2.6
, this value is valkey-8.0.2
by default.
Each operator release supports several Valkey versions. Only the permitted version strings are valid input for the field. Entries that do not match a supported version generate an error. Run kubectl get valkeyversion
to verify the Valkey versions of your operator release.
Example: valkey-8.0.2
valkeyCommanderConfig.enabled
Type: boolean
Optional
Default: false
If enabled, the Valkey Commander management UI will be deployed with the Valkey instance. Users can use this to connect to the instance and perform the supported operations.
valkeyCommanderConfig.image
Type: string
Required if valkeyCommanderConfig.enabled
is enabled
If Valkey Commander is enabled, then the Valkey Commander image must be mentioned in order to create ValkeyCommander
CR that uses this image to deploy the container.
valkeyCommanderConfig.loginSecret
Type: string
Optional
If Valkey Commander is enabled, the users can provide login credentials for Valkey Commander. The secret must contain two data fields:
username
, which identifies the user name for the Valkey Commanderpassword
, which identifies the password for the Valkey Commander
kubernetesConfig.imagePullSecrets
Type: string[]
Optional
Default: imagePullSecretName:
, which is used during operator deployment as set in the operator’s values.yaml
. For more information, see Install Tanzu for Valkey on Kubernetes.
The secret might need to be re-created within your pod’s namespace for your pod to access it.
Example: tanzu-image-registry
kubernetesConfig.resources
Type: object
Optional
This object is a mapping of strings to ResourceRequirements
that describes the compute resource requirements (requests and limits of CPU and memory).
The supported keys are requests
and limits
.
Memory specifies the amount of memory allocated to a container and defines a memory limit. If a pod tries to exceed the limit, the pod is replaced by a new pod. Memory units can use a suffix, such as 4.5Gi
. For more information about resource allocation in Kubernetes, see the Kubernetes documentation.
CPU is the amount of CPU resources allocated to a container, specified as a Kubernetes CPU unit. For example, cpu: "1.2"
. If left empty, it inherits the default limit of its namespace, if a limit exists, or has no limit on CPU consumed. For more information about resource allocation in Kubernetes, see the Kubernetes documentation.
kubernetesConfig.valkeySecret
Type: object
Optional
This object is a mapping of the secret given for a Valkey instance. This is used as the master password when deploying the Valkey instance.
The supported keys are name
and key
.
name
specifies the name of the secret. The secret must be present in the current namespace where the Valkey instance will be deployed.
key
is the key in the secret that contains the password.
storage
Type: object
Optional
This object is used to enable persistence for the Valkey instance. This is used to create PVC that stores the Valkey data.
The supported keys are:
-
enabled
, which indicates whether persistence should be enabled or not. -
type
, which indicates the persistence type. Supported values arerdb
,aof
andrdb+aof
-
keepAfterDelete
, which keeps the PVC after the Valkey instance is deleted. -
storageSize
, which specifies the size of the PVC. -
accessModes
, which specifies the operation that can be performed on the PVC supported by that particular volume. For more information, see the Kubernetes documentation -
name
, which specifies the name of the PVC. -
volumeMount
, which specifies any additional volume mounts.
Example
apiVersion: data.tanzu.vmware.com/v1
kind: Valkey
metadata:
labels:
app.kubernetes.io/name: tanzu-for-valkey-on-kubernetes
name: valkey-sample
namespace: valkey-operator
spec:
valkeyVersion:
name: valkey-8.0.2
valkeyCommanderConfig:
enabled: true
image: tanzu-valkey.packages.broadcom.com/tanzu-valkey-container/tanzu-valkey-commander:1.0.0
loginSecret: valkey-commander-login-secret
kubernetesConfig:
imagePullSecrets:
- name: tanzu-image-registry
resources:
requests:
cpu: 101m
memory: 128Mi
limits:
cpu: 101m
memory: 128Mi
valkeySecret:
name: valkey-secret
key: valkey-password
persistence:
enabled: true
type: "rdb"
keepAfterDelete: true
storageSize: 3Gi
accessModes: ["ReadWriteOnce"]
Valkey Replication
apiVersion: data.tanzu.vmware.com/v1
kind: ValkeyReplication
metadata:
name: valkey-replication
spec:
#### Specify the replication size
# clusterSize: 3
#### Specify the Valkey Version
# valkeyVersion:
# name: valkey-8.0.2
### Specify valkey commander configuration (Optional)
# valkeyCommanderConfig:
# enabled: true
# image: valkey-commander:1.0.0
# loginSecret: valkey-commander-login-secret
### Specify usual kubernetes related configuration like image pull secrets, resource limits and requests
# kubernetesConfig:
# imagePullSecrets:
# - registry-secret
# resources:
# requests:
# cpu: 101m
# memory: 128Mi
# limits:
# cpu: 101m
# memory: 128Mi
### Specify valkey secret used for Valkey deployment
# valkeySecret:
# name: secret-name
# key: secret-key
#### Set the persistence preference for the valkey
# persistence:
# enabled: true
# type: "rdb"
# keepAfterDelete: true
# storageSize: 3Gi
# accessModes: ["ReadWriteOnce"]
Description
Applying this resource causes the Kubernetes operator to create a StatefulSet
with a single Pod and one container. The Valkey pod mounts a persistent volume claim (PVC) if the storage section is added and the storage size is mentioned.
You specify Valkey instance configuration properties to Tanzu for Valkey on Kubernetes with a YAML-formatted manifest file. A sample manifest file is provided in valkey.yaml
. For information about deploying a new Valkey instance using a manifest file, see Create and delete Valkey instances The list below explains the properties that you can set in your Valkey resource.
Metadata
name
Type: string
Required
This is the name of the Valkey instance. It must be unique within a namespace. It cannot be modified after the Valkey instance has been created. The metadata can set the name, namespace, labels, annotations, and more for the Valkey object. For more information, see the Kubernetes documentation.
Example: valkey-sample
Spec
clusterSize
Type: int
Required
Default: 3
This is the number of replicas that must be created for Valkey replication.
Example: 3
valkeyVersion
Type: string
Required
Default: <latest Valkey release supported>
This is the Valkey version that is used for creating an instance. If the user does not specify a value, the latest supported version is used as the default. For example, if Tanzu for Valkey on Kubernetes supports valkey-8.0.2
, valkey-7.2.8
and valkey-7.2.6
then this value is valkey-8.0.2
by default.
Each operator release supports several Valkey versions. Only the permitted version strings are valid input for the field. Entries that do not match a supported version generate an error. Run kubectl get valkeyversion
to verify the Valkey versions of your operator release.
Example: valkey-8.0.2
valkeyCommanderConfig.enabled
Type: boolean
Optional
Default: false
If enabled, the Valkey Commander management UI is deployed with the Valkey instance. Users can use this to connect to the instance and perform the supported operation.
valkeyCommanderConfig.image
Type: string
Required if valkeyCommanderConfig.enabled
is enabled
If Valkey Commander is enabled, then the Valkey Commander image must be mentioned in order to create ValkeyCommander
CR that uses this image to deploy the container.
valkeyCommanderConfig.loginSecret
Type: string
Optional
If Valkey Commander is enabled, users can provide login credentials for Valkey Commander. The secret must contain two data fields:
username
, which identifies the user name for the Valkey Commanderpassword
, which identifies the password for the Valkey Commander
kubernetesConfig.imagePullSecrets
Type: string[]
Optional
Default: imagePullSecretName:
, which is used during operator deployment as set in the operator’s values.yaml
. For more information, see Install Tanzu for Valkey on Kubernetes.
The secret might need to be re-created within your pod’s namespace for your pod to access it.
Example: tanzu-image-registry
kubernetesConfig.resources
Type: object
Optional
This object is a mapping of strings to ResourceRequirements
that describes the compute resource requirements (requests and limits of CPU and memory).
The supported keys are requests
and limits
.
Memory specifies the amount of memory allocated to a container and defines a memory limit. If a pod tries to exceed the limit, the pod is replaced by a new pod. Memory units can use a suffix, such as 4.5Gi
. For more information about resource allocation in Kubernetes, see the Kubernetes documentation.
CPU is the amount of CPU resources allocated to a container, specified as a Kubernetes CPU unit. For example, cpu: "1.2"
. If left empty, it inherits the default limit of its namespace, if a limit exists, or has no limit on CPU consumed. For more information about resource allocation in Kubernetes, see the Kubernetes documentation.
kubernetesConfig.valkeySecret
Type: object
Optional
This object is a mapping of a secret given for a Valkey instance. This is used as the master password when deploying the Valkey instance.
The supported keys are name
and key
.
name
specifies the name of the secret. The secret must be in the current namespace where the Valkey instance will be deployed.
key
is the key in the secret that contains the password.
storage
Type: object
Optional
This object is used to enable persistence for the Valkey instance. This is used to create PVC that stores the Valkey data.
The supported keys are:
-
enabled
, which indicates whether persistence should be enabled or not. -
type
, which indicates the persistence type. Supported values arerdb
,aof
andrdb+aof
-
keepAfterDelete
, which keeps the PVC after the Valkey instance is deleted. -
storageSize
, which specifies the size of the PVC. -
accessModes
, which specifies the operation that can be performed on the PVC supported by that particular volume. For more information, see the Kubernetes documentation -
name
, which specifies the name of the PVC. -
volumeMount
, which specifies any additional volume mounts.
Example
apiVersion: data.tanzu.vmware.com/v1
kind: ValkeyReplication
metadata:
labels:
app.kubernetes.io/name: tanzu-for-valkey-on-kubernetes
name: valkey-replication
namespace: valkey-operator
spec:
clusterSize: 3
valkeyVersion:
name: valkey-8.0.2
valkeyCommanderConfig:
enabled: true
image: tanzu-valkey.packages.broadcom.com/tanzu-valkey-container/tanzu-valkey-commander:1.0.0
loginSecret: valkey-commander-login-secret
kubernetesConfig:
imagePullSecrets:
- name: tanzu-image-registry
imagePullPolicy: "Always"
resources:
requests:
cpu: 101m
memory: 128Mi
limits:
cpu: 101m
memory: 128Mi
valkeySecret:
name: valkey-secret
key: valkey-password
persistence:
enabled: true
type: "rdb"
keepAfterDelete: true
storageSize: 3Gi
accessModes: ["ReadWriteOnce"]
Valkey Sentinel
apiVersion: data.tanzu.vmware.com/v1
kind: ValkeySentinel
metadata:
name: valkey-sentinel
spec:
#### Specify the replication size for sentinel
# clusterSize: 3
#### Set the persistence preference for the valkey
# persistence:
# enabled: true
# type: "rdb"
# keepAfterDelete: true
# storageSize: 3Gi
# accessModes: ["ReadWriteOnce"]
#### Set the service account for valkey sentinel
# serviceAccountName: controller-manager
#### Specify the Valkey Version
# valkeyVersion:
# name: valkey-8.0.2
### Specify valkey commander configuration (Optional)
# valkeyCommanderConfig:
# enabled: true
# image: valkey-commander:1.0.0
# loginSecret: valkey-commander-login-secret
### Specify usual kubernetes related configuration like image pull secrets, resource limits and requests
# kubernetesConfig:
# imagePullSecrets:
# - registry-secret
### Specify valkey secret used for Valkey deployment
# valkeySecret:
# name: secret-name
# key: secret-key
### Specify the configuration for Sentinel deployment
# valkeySentinelConfig:
# valkeyReplicationName: valkey-replication
# quorum: "2"
Description
Applying this resource causes the Kubernetes operator to create a StatefulSet
with a single pod and one container. The Valkey pod mounts a persistent volume claim (PVC) if the storage section is added and the storage size is mentioned.
You specify Valkey instance configuration properties to Tanzu for Valkey on Kubernetes with a YAML-formatted manifest file. A sample manifest file is provided in valkey.yaml
. For more information about deploying a new Valkey instance using a manifest file, see Create and delete Valkey instances.
Metadata
name
Type: string
Required
This is the name of the Valkey instance. It must be unique within a namespace. It cannot be modified after the Valkey instance has been created. The metadata can set the name, namespace, labels, annotations, and more for the Valkey object. For more information, see the Kubernetes documentation.
Example: valkey-sample
Spec
clusterSize
Type: int
Required
Default: 3
This is the number of replicas that must be created for Valkey replication.
Example: 3
serviceAccountName
Type: string
The service account that has the associated role and rolebinding
. When ValkeySentinel
is created, it creates ValkeyReplication
first. For this creation, the operator needs a role that has access to create
, update
, delete
, patch
, and get
verbs.
valkeyVersion
Type: string
Required
Default: <latest Valkey release supported>
The Valkey version that is used for creating an instance. If the user does not specify a value, the latest supported version is used as the default. For example, if Tanzu for Valkey on Kubernetes supports valkey-8.0.2
, valkey-7.2.8
and valkey-7.2.6
then this value is valkey-8.0.2
by default.
Each operator release supports several Valkey versions. Only the permitted version strings are valid input for the field. Entries that do not match a supported version generate an error. Run kubectl get valkeyversion
to verify the Valkey versions of your operator release.
Example: valkey-8.0.2
valkeyCommanderConfig.enabled
Type: boolean
Optional
Default: false
If enabled, the Valkey Commander management UI is deployed with the Valkey instance. Users can use this to connect to the instance and perform the supported operations.
valkeyCommanderConfig.image
Type: string
Required if valkeyCommanderConfig.enabled
is enabled
If Valkey Commander is enabled, then the Valkey Commander image must be mentioned to create the ValkeyCommander
CR that uses this image to deploy the container.
valkeyCommanderConfig.loginSecret
Type: string
Optional
If Valkey Commander is enabled, users can provide login credentials for Valkey Commander. The secret must contain two data fields:
username
, which identifies the user name for the Valkey Commanderpassword
, which identifies the password for the Valkey Commander
kubernetesConfig.imagePullSecrets
Type: string[]
Optional
Default: imagePullSecretName:
is used during operator deployment, as set in the operator’s values.yaml
. For more information, see Install Tanzu for Valkey on Kubernetes.
The secret might need to be re-created within your pod’s namespace for your pod to access it.
Example: tanzu-image-registry
valkeySentinelConfig.valkeyReplicationName
Type: string
Required
ValkeySentinel
will create a ValkeyReplication
. The field indicates the name of the ValkeyReplication
that will be created.
valkeySentinelConfig.quorum
Type: string
Optional
Default: 2
This is the quorum (majority) required for the Sentinel to come into conclusion during the election of a new leader when the actual primary goes down.
storage
Type: object
Optional
This object is used to enable persistence for the Valkey instance. This is used to create PVC that stores the Valkey data.
The supported keys are:
-
enabled
, which indicates whether persistence should be enabled or not. -
type
, which indicates the persistence type. Supported values arerdb
,aof
andrdb+aof
-
keepAfterDelete
, which keeps the PVC after the Valkey instance is deleted. -
storageSize
, which specifies the size of the PVC. -
accessModes
, which specifies the operation that can be performed on the PVC supported by that particular volume. For more information, see the Kubernetes documentation -
name
, which specifies the name of the PVC. -
volumeMount
, which specifies any additional volume mounts.
Example
apiVersion: data.tanzu.vmware.com/v1
kind: ValkeySentinel
metadata:
labels:
app.kubernetes.io/name: tanzu-for-valkey-on-kubernetes
name: valkey-sentinel
namespace: valkey-operator
spec:
clusterSize: 3
serviceAccountName: valkey-sentinel-sa
valkeyVersion:
name: valkey-8.0.2
kubernetesConfig:
imagePullSecrets:
- name: tanzu-image-registry
valkeySecret:
name: valkey-secret
key: valkey-password
valkeySentinelConfig:
valkeyReplicationName: valkey-sample-replication
quorum: "2"
valkeyCommanderConfig:
enabled: true
image: tanzu-valkey.packages.broadcom.com/tanzu-valkey-container/tanzu-valkey-commander:1.0.0
loginSecret: valkey-commander-login-secret
persistence:
enabled: true
type: "rdb"
keepAfterDelete: true
storageSize: 3Gi
accessModes: ["ReadWriteOnce"]
Content feedback and comments