Addon specifies a Secret containing YAML to be deployed on cluster startup.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
secretNamespace string |
SecretNamespace is the namespace of the Secret. | ||
secretRef string |
SecretRef is the name of the Secret. |
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:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string |
k3k.io/v1alpha1 |
||
kind string |
Cluster |
||
metadata ObjectMeta |
Refer to Kubernetes API documentation for fields of metadata . |
||
spec ClusterSpec |
Spec defines the desired state of the Cluster. | { } |
ClusterLimit defines resource limits for server and agent nodes.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
serverLimit ResourceList |
ServerLimit specifies resource limits for server nodes. | ||
workerLimit ResourceList |
WorkerLimit specifies resource limits for agent nodes. |
ClusterList is a list of Cluster resources.
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string |
k3k.io/v1alpha1 |
||
kind string |
ClusterList |
||
metadata ListMeta |
Refer to Kubernetes API documentation for fields of metadata . |
||
items Cluster array |
Underlying type: string
ClusterMode is the possible provisioning mode of a Cluster.
Validation:
- Enum: [shared virtual]
Appears in:
ClusterSpec defines the desired state of a virtual Kubernetes cluster.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
version string |
Version is the K3s version to use for the virtual nodes. It should follow the K3s versioning convention (e.g., v1.28.2-k3s1). If not specified, the Kubernetes version of the host node will be used. |
||
mode ClusterMode |
Mode specifies the cluster provisioning mode: "shared" or "virtual". Defaults to "shared". This field is immutable. |
shared | Enum: [shared virtual] |
servers integer |
Servers specifies the number of K3s pods to run in server (control plane) mode. Must be at least 1. Defaults to 1. |
1 | |
agents integer |
Agents specifies the number of K3s pods to run in agent (worker) mode. Must be 0 or greater. Defaults to 0. This field is ignored in "shared" mode. |
0 | |
clusterCIDR string |
ClusterCIDR is the CIDR range for pod IPs. Defaults to 10.42.0.0/16 in shared mode and 10.52.0.0/16 in virtual mode. This field is immutable. |
||
serviceCIDR string |
ServiceCIDR is the CIDR range for service IPs. Defaults to 10.43.0.0/16 in shared mode and 10.53.0.0/16 in virtual mode. This field is immutable. |
||
clusterDNS string |
ClusterDNS is the IP address for the CoreDNS service. Must be within the ServiceCIDR range. Defaults to 10.43.0.10. This field is immutable. |
||
persistence PersistenceConfig |
Persistence specifies options for persisting etcd data. Defaults to dynamic persistence, which uses a PersistentVolumeClaim to provide data persistence. A default StorageClass is required for dynamic persistence. |
{ type:dynamic } | |
expose ExposeConfig |
Expose specifies options for exposing the API server. By default, it's only exposed as a ClusterIP. |
||
nodeSelector object (keys:string, values:string) |
NodeSelector specifies node labels to constrain where server/agent pods are scheduled. In "shared" mode, this also applies to workloads. |
||
priorityClass string |
PriorityClass specifies the priorityClassName for server/agent pods. In "shared" mode, this also applies to workloads. |
||
clusterLimit ClusterLimit |
Limit defines resource limits for server/agent nodes. | ||
tokenSecretRef SecretReference |
TokenSecretRef is a Secret reference containing the token used by worker nodes to join the cluster. The Secret must have a "token" field in its data. |
||
tlsSANs string array |
TLSSANs specifies subject alternative names for the K3s server certificate. | ||
serverArgs string array |
ServerArgs specifies ordered key-value pairs for K3s server pods. Example: ["--tls-san=example.com"] |
||
agentArgs string array |
AgentArgs specifies ordered key-value pairs for K3s agent pods. Example: ["--node-name=my-agent-node"] |
||
addons Addon array |
Addons specifies secrets containing raw YAML to deploy on cluster startup. |
ExposeConfig specifies options for exposing the API server.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
ingress IngressConfig |
Ingress specifies options for exposing the API server through an Ingress. | ||
loadbalancer LoadBalancerConfig |
LoadBalancer specifies options for exposing the API server through a LoadBalancer service. | ||
nodePort NodePortConfig |
NodePort specifies options for exposing the API server through NodePort. |
IngressConfig specifies options for exposing the API server through an Ingress.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
annotations object (keys:string, values:string) |
Annotations specifies annotations to add to the Ingress. | ||
ingressClassName string |
IngressClassName specifies the IngressClass to use for the Ingress. |
LoadBalancerConfig specifies options for exposing the API server through a LoadBalancer service.
Appears in:
NodePortConfig specifies options for exposing the API server through NodePort.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
serverPort integer |
ServerPort is the port on each node on which the K3s server service is exposed when type is NodePort. If not specified, a port will be allocated (default: 30000-32767). |
||
servicePort integer |
ServicePort is the port on each node on which the K3s service is exposed when type is NodePort. If not specified, a port will be allocated (default: 30000-32767). |
||
etcdPort integer |
ETCDPort is the port on each node on which the ETCD service is exposed when type is NodePort. If not specified, a port will be allocated (default: 30000-32767). |
PersistenceConfig specifies options for persisting etcd data.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
type PersistenceMode |
Type specifies the persistence mode. | dynamic | |
storageClassName string |
StorageClassName is the name of the StorageClass to use for the PVC. This field is only relevant in "dynamic" mode. |
||
storageRequestSize string |
StorageRequestSize is the requested size for the PVC. This field is only relevant in "dynamic" mode. |
Underlying type: string
PersistenceMode is the storage mode of a Cluster.
Appears in: