API Reference
k3k.io/v1beta1 package
Resource Types
Addon
Addon specifies a Secret containing YAML to be deployed on cluster startup.
Appears in:
-
ClusterSpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
SecretNamespace is the namespace of the Secret. |
||
|
SecretRef is the name of the Secret. |
Cluster
Cluster defines a virtual Kubernetes cluster managed by k3k. It specifies the desired state of a virtual cluster, including version, node configuration, and networking. k3k uses this to provision and manage these virtual clusters.
Appears in:
-
ClusterList
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
|
Spec defines the desired state of the Cluster. |
{ } |
ClusterList
ClusterList is a list of Cluster resources.
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
|
ClusterMode
Underlying type: string
ClusterMode is the possible provisioning mode of a Cluster.
Validation:
-
Enum: [shared virtual]
Appears in:
-
ClusterSpec
-
VirtualClusterPolicySpec
ClusterPhase
Underlying type: string
ClusterPhase is a high-level summary of the cluster’s current lifecycle state.
Appears in:
-
ClusterStatus
ClusterSpec
ClusterSpec defines the desired state of a virtual Kubernetes cluster.
Appears in:
-
Cluster
| Field | Description | Default | Validation |
|---|---|---|---|
|
Version is the K3s version to use for the virtual nodes. |
||
|
Mode specifies the cluster provisioning mode: "shared" or "virtual". |
shared |
Enum: [shared virtual] |
|
Servers specifies the number of K3s pods to run in server (control plane) mode. |
1 |
|
|
Agents specifies the number of K3s pods to run in agent (worker) mode. |
0 |
|
|
ClusterCIDR is the CIDR range for pod IPs. |
||
|
ServiceCIDR is the CIDR range for service IPs. |
||
|
ClusterDNS is the IP address for the CoreDNS service. |
||
|
Persistence specifies options for persisting etcd data. |
||
|
Expose specifies options for exposing the API server. |
||
|
NodeSelector specifies node labels to constrain where server/agent pods are scheduled. |
||
|
PriorityClass specifies the priorityClassName for server/agent pods. |
||
|
TokenSecretRef is a Secret reference containing the token used by worker nodes to join the cluster. |
||
|
TLSSANs specifies subject alternative names for the K3s server certificate. |
||
|
ServerArgs specifies ordered key-value pairs for K3s server pods. |
||
|
AgentArgs specifies ordered key-value pairs for K3s agent pods. |
||
|
ServerEnvs specifies list of environment variables to set in the server pod. |
||
|
AgentEnvs specifies list of environment variables to set in the agent pod. |
||
|
Addons specifies secrets containing raw YAML to deploy on cluster startup. |
||
|
ServerLimit specifies resource limits for server nodes. |
||
|
WorkerLimit specifies resource limits for agent nodes. |
||
|
MirrorHostNodes controls whether node objects from the host cluster |
||
|
CustomCAs specifies the cert/key pairs for custom CA certificates. |
||
|
Sync specifies the resources types that will be synced from virtual cluster to host cluster. |
{} |
ConfigMapSyncConfig
ConfigMapSyncConfig specifies the sync options for services.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
|
Enabled is an on/off switch for syncing resources. |
||
|
Selector specifies set of labels of the resources that will be synced. If empty, then all resources of the given type will be synced. |
CredentialSource
CredentialSource defines where to get a credential from. It can represent either a TLS key pair or a single private key.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
|
SecretName specifies the name of an existing secret to use. |
CredentialSources
CredentialSources lists all the required credentials, including both TLS key pairs and single signing keys.
Appears in:
-
CustomCAs
| Field | Description | Default | Validation |
|---|---|---|---|
|
ServerCA specifies the server-ca cert/key pair. |
||
|
ClientCA specifies the client-ca cert/key pair. |
||
|
RequestHeaderCA specifies the request-header-ca cert/key pair. |
||
|
ETCDServerCA specifies the etcd-server-ca cert/key pair. |
||
|
ETCDPeerCA specifies the etcd-peer-ca cert/key pair. |
||
|
ServiceAccountToken specifies the service-account-token key. |
CustomCAs
CustomCAs specifies the cert/key pairs for custom CA certificates.
Appears in:
-
ClusterSpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
Enabled toggles this feature on or off. |
||
|
Sources defines the sources for all required custom CA certificates. |
ExposeConfig
ExposeConfig specifies options for exposing the API server.
Appears in:
-
ClusterSpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
Ingress specifies options for exposing the API server through an Ingress. |
||
|
LoadBalancer specifies options for exposing the API server through a LoadBalancer service. |
||
|
NodePort specifies options for exposing the API server through NodePort. |
IngressConfig
IngressConfig specifies options for exposing the API server through an Ingress.
Appears in:
-
ExposeConfig
| Field | Description | Default | Validation |
|---|---|---|---|
|
Annotations specifies annotations to add to the Ingress. |
||
|
IngressClassName specifies the IngressClass to use for the Ingress. |
IngressSyncConfig
IngressSyncConfig specifies the sync options for services.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
|
Enabled is an on/off switch for syncing resources. |
||
|
Selector specifies set of labels of the resources that will be synced. If empty, then all resources of the given type will be synced. |
LoadBalancerConfig
LoadBalancerConfig specifies options for exposing the API server through a LoadBalancer service.
Appears in:
-
ExposeConfig
| Field | Description | Default | Validation |
|---|---|---|---|
|
ServerPort is the port on which the K3s server is exposed when type is LoadBalancer. |
||
|
ETCDPort is the port on which the ETCD service is exposed when type is LoadBalancer. |
NodePortConfig
NodePortConfig specifies options for exposing the API server through NodePort.
Appears in:
-
ExposeConfig
| Field | Description | Default | Validation |
|---|---|---|---|
|
ServerPort is the port on each node on which the K3s server is exposed when type is NodePort. |
||
|
ETCDPort is the port on each node on which the ETCD service is exposed when type is NodePort. |
PersistenceConfig
PersistenceConfig specifies options for persisting etcd data.
Appears in:
-
ClusterSpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
Type specifies the persistence mode. |
dynamic |
|
|
StorageClassName is the name of the StorageClass to use for the PVC. |
||
|
StorageRequestSize is the requested size for the PVC. |
1G |
PersistenceMode
Underlying type: string
PersistenceMode is the storage mode of a Cluster.
Appears in:
-
PersistenceConfig
PersistentVolumeClaimSyncConfig
PersistentVolumeClaimSyncConfig specifies the sync options for services.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
|
ServerPort is the port on each node on which the K3s server is exposed when type is NodePort. |
||
|
ETCDPort is the port on each node on which the ETCD service is exposed when type is NodePort. |
PodSecurityAdmissionLevel
Underlying type: string
PodSecurityAdmissionLevel is the policy level applied to the pods in the namespace.
Validation:
-
Enum: [privileged baseline restricted]
Appears in:
-
VirtualClusterPolicySpec
PriorityClassSyncConfig
PriorityClassSyncConfig specifies the sync options for services.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
|
Enabled is an on/off switch for syncing resources. |
||
|
Selector specifies set of labels of the resources that will be synced. If empty then all resources of the given type will be synced. |
SecretSyncConfig
SecretSyncConfig specifies the sync options for services.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
|
Enabled is an on/off switch for syncing resources. |
||
|
Selector specifies set of labels of the resources that will be synced. If empty then all resources of the given type will be synced. |
ServiceSyncConfig
ServiceSyncConfig specifies the sync options for services.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
|
Enabled is an on/off switch for syncing resources. |
||
|
Selector specifies set of labels of the resources that will be synced. If empty then all resources of the given type will be synced. |
SyncConfig
SyncConfig will contain the resources that should be synced from virtual cluster to host cluster.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
services ServiceSyncConfig |
Services resources sync configuration. |
{ enabled:true } |
|
configmaps ConfigMapSyncConfig |
ConfigMaps resources sync configuration. |
{ enabled:true } |
|
secrets SecretSyncConfig |
Secrets resources sync configuration. |
{ enabled:true } |
|
ingresses IngressSyncConfig |
Ingresses resources sync configuration. |
{ enabled:false } |
|
persistentVolumeClaims PersistentVolumeClaimSyncConfig |
PersistentVolumeClaims resources sync configuration. |
{ enabled:false } |
|
priorityClasses PriorityClassSyncConfig |
PriorityClasses resources sync configuration. |
{ enabled:false } |
VirtualClusterPolicy
VirtualClusterPolicy allows defining common configurations and constraints for clusters within a clusterpolicy.
Appears in:
-
VirtualClusterPolicyList
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
|
Spec defines the desired state of the VirtualClusterPolicy. |
{ } |
VirtualClusterPolicyList
VirtualClusterPolicyList is a list of VirtualClusterPolicy resources.
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
|
VirtualClusterPolicySpec
VirtualClusterPolicySpec defines the desired state of a VirtualClusterPolicy.
Appears in:
-
VirtualClusterPolicy
| Field | Description | Default | Validation |
|---|---|---|---|
|
Quota specifies the resource limits for clusters within a clusterpolicy. |
||
|
Limit specifies the LimitRange that will be applied to all pods within the VirtualClusterPolicy |
||
|
DefaultNodeSelector specifies the node selector that applies to all clusters (server + agent) in the target Namespace. |
||
|
DefaultPriorityClass specifies the priorityClassName applied to all pods of all clusters in the target Namespace. |
||
|
AllowedMode specifies the allowed cluster provisioning mode. Defaults to "shared". |
shared |
Enum: [shared virtual] |
|
DisableNetworkPolicy indicates whether to disable the creation of a default network policy for cluster isolation. |
||
|
PodSecurityAdmissionLevel specifies the pod security admission level applied to the pods in the namespace. |
Enum: [privileged baseline restricted] |