API Version
kubelb.k8c.io/v1alpha1
Spec Fields
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time.
Contains the secret data. Each key must consist of alphanumeric characters, ’-’, ’_’ or ’.’. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here.
Allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.
Used to facilitate programmatic handling of secret data. More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-typesCommon types:
Opaque(default): arbitrary user-defined datakubernetes.io/service-account-token: service account tokenkubernetes.io/dockercfg: serialized ~/.dockercfg filekubernetes.io/dockerconfigjson: serialized ~/.docker/config.json filekubernetes.io/basic-auth: credentials for basic authenticationkubernetes.io/ssh-auth: credentials for SSH authenticationkubernetes.io/tls: data for a TLS client or serverbootstrap.kubernetes.io/token: bootstrap token data
Example
Basic Opaque Secret
Secret with StringData
TLS Secret
Docker Config Secret
Basic Auth Secret
SSH Auth Secret
Immutable Secret
Usage
SyncSecret resources are automatically synchronized from tenant clusters to the KubeLB management cluster. They are typically used for:- TLS certificates for secure communication
- Authentication credentials for external services
- Docker registry credentials for pulling images
- API keys and tokens
- SSH keys for Git operations
Notes
- The SyncSecret resource follows the same structure as a standard Kubernetes Secret
- Data values in the
datafield must be base64 encoded - The
stringDatafield is a convenience field that accepts plain text and is automatically base64 encoded - When both
dataandstringDataare specified, values fromstringDatatake precedence - Immutable secrets cannot be modified after creation, only deleted and recreated
- Secret data is sensitive and should be handled with appropriate security measures
- The SyncSecret controller ensures secure synchronization between tenant and management clusters
