Property Reference for the MySQL Resource
Page last updated:
This topic is a property reference table for the MySQL resource. Refer to this table when you are creating the YAML file for a MySQL instance. For more information, see Create a Mysql Instance in Creating and Deleting a MySQL Instance.
The table below explains the properties that you can set in your MySQL resource.
Property | Type | Default | Description | Example | Required? |
---|---|---|---|---|---|
metadata.name |
String | n/a | The name of your MySQL instance:
|
my‑instance |
Yes |
spec.storageSize |
Resource quantity | n/a | StorageSize specifies the size of the persistent volume claims (PVCs) for the Tanzu MySQL for Kubernetes Pods. For information about the units allowed for these PVC sizes, see about resource quantities in kubernetes / community in GitHub. | 50Gi |
Yes |
spec.imagePullSecret |
String | n/a | Refers to an existing Kubernetes docker-registry secret that can access the registry that contains the MySQL image. | tanzu-mysql-image-registry |
Yes |
spec.storageClassName |
String | Standard | Specifies the StorageClass for the PVCs for the Tanzu MySQL for Kubernetes Pods. For the types of StorageClasses available, contact your Kubernetes admin. For more information about the Kubernetes StorageClass concept, see the Kubernetes documentation. | standard |
No |
spec.serviceType |
String | ClusterIP | Specifies the type of Service used to provide access to the MySQL database.
Only ClusterIP and LoadBalancer are supported.
For more information about the Kubernetes ServiceTypes, see the
Kubernetes documentation. |
LoadBalancer |
No |
spec.tls.secret.name |
String | n/a | The name of the Kubernetes secret that contains the TLS certificate and private key to support encrypted connections by clients. | mysql-tls-secret |
No |
spec.highAvailability.enabled |
Boolean | False | Specifies whether the instance will be a single node or a high-availability multi-node cluster. For more information about high availability, see Configuring MySQL Instances for High Availability. | highAvailability.enabled: false |
No |
spec.resources.mysql |
|
Best effort | Describes the maximum CPU and memory allowed for the MySQL container. If left blank, Kubernetes does its best effort to allocate necessary compute resources for the MySQL container. For more information about managing resources for containers, see the Kubernetes documentation. | limits.cpu: 3 , limits.memory: 800Mi |
No |
spec.resources.mysql |
|
Best effort | Describes the minimum CPU and memory allowed for the MySQL container. If left blank, it defaults to limits if limits have been explicitly specified. For more information about limits, see the Kubernetes documentation. | requests.cpu: 2 , requests.memory: 500Mi |
No |
spec.resources.mysqlSidecar |
|
Best effort | Describes the maximum CPU and memory allowed for the mysql-sidecar container. If left blank, Kubernetes does its best effort to allocate the necessary compute resources for the mysql-sidecar container. For more information about CPU and memory resources, see the Kubernetes documentation. | limits.cpu: 2 , limits.memory: 500Mi |
No |
spec.resources.mysqlSidecar |
|
Best effort | Describes the minimum CPU and memory allowed for the mysql-sidecar container. If left blank, it defaults to limits if limits have been explicitly specified. For more information about limits, see the Kubernetes documentation. | requests.cpu: 1 , requests.memory: 200Mi
|
No |
spec.resources.proxy |
|
Best effort | Describes the maximum CPU and memory allowed for the proxy container. This container is only created when
spec.highAvailability.enabled is specified as true .
If left blank, Kubernetes does its best effort to allocate the necessary compute resources
for the proxy container.
For more information about CPU and memory resources,
see the
Kubernetes documentation.
|
limits.cpu: 1000m, limits.memory: 256Mi |
No |
spec.resources.proxy |
|
Best effort | Describes the minimum CPU and memory allowed for the proxy container. This container is only created when
spec.highAvailability.enabled is specified as true .
If left blank, it defaults to limits if limits have been explicitly specified.
For more information about limits, see the
Kubernetes documentation.
|
requests.cpu: 200m;, requests.memory: 48Mi
|
No |