🚀🚀 100% API Conformance 🚀🚀
This is a big milestone for vcluster as vcluster now passes 100% of Kubernetes conformance tests for Kubernetes version v1.20. Check conformance on how to reproduce the test result.
Support for etcd, mysql & postgresql datastorage
vcluster now officially supports data storage backends such as etcd, mysql & postgresql instead of the default sqlite storage. Take a look at the vcluster docs for more information.
Support for metrics-server, kube-prometheus-stack & HorizontalPodAutoscaler
By default, vcluster will now create a service for each node which redirects incoming traffic to the node kubelet from within the vcluster to vcluster itself. This means that if workloads within the vcluster try to scrape node metrics the traffic reaches vcluster first. Vcluster will redirect the incoming request to the host cluster and rewrite the response (pod names, pod namespaces etc) and return it to the requester.
This makes it possible to use Kubernetes features such as metrics-server, prometheus operator or HorizontalPodAutoscaler within the vcluster. However for this to work, you'll need to give vcluster RBAC permissions to access the nodes of the host cluster, which can be done via vcluster create ... --create-cluster-role
Support for DownwardAPI metadata.labels, Pod (Anti) Affinity & Pod Topology Constraints
vcluster will now sync labels of resources. In order to avoid conflicts in the host namespace, vcluster will rewrite them to be uniquely identifiable in the host cluster.
This makes it possible to use features like downwardAPI fields like metadata.labels['my-label'], pod (anti) affinity and pod topology constraints in the vcluster.
Other Changes
- cli:
vcluster createnow uses the cli version as default vcluster chart version - cli:
vcluster deletenow deletes the PVC as well except--keep-pvcis specified (#29) - cli: Added
--contextflag for vcluster commands to specify a kubernetes context (#38) - cli: New
--create-cluster-roleflag forvcluster createto tell vcluster to create a cluster role - cli: New
--k3s-imageflag forvcluster createto specify the k3s image version - cli: New
--serverflag invcluster connectto create kube configs for vclusters that use a NodePort, LoadBalancer or Ingress - cli: New
--extra-values/-fflag invcluster createto allow specification of additional value files that will be merged with the default ones - cli: Fixed an issue where
vcluster connect --update-currentwould not work correctly - syncer: Replace
.-strings with-during translation from virtual name to physical name (#51) - syncer: Added support for pod
spec.affinity.podAffinityandspec.affinity.podAntiAffinity(#52) - syncer: Fixed an issue where long running requests such as
kubectl execcould wrongfully timeout - syncer: vcluster now calls the virtual cluster admission webhooks for the requests
pods/exec,pods/attach&pods/portforward - syncer: syncer will not redirect
pods/proxyandservice/proxyrequests anymore - syncer: vcluster will now use the virtual cluster k3s version as fake node version
- syncer: New flag
--enable-priority-classesto sync priority classes from vcluster to the host cluster. This is by default off and if not enabled, vcluster will strip out any priority classes of pods that will be synced to the host cluster to avoid problems with unknown priority classes - syncer: New flag
--fake-kubeletsto disable fake kubelet endpoints - syncer: vcluster now supports switching service type from ExternalName to NodePort / ClusterIP
- syncer: vcluster will now set the actual allocatable resources for synced nodes if
--fake-nodes=false - syncer: Secrets, endpoints and configmaps are now synced without "applying" changes. This has the advantage that synced resources do not need to store the original configuration anymore and differences between virtual and physical objects can be calculated more precisely
- syncer: Added a new flag
--sync-node-changesthat will sync the node resources, taints & labels from the virtual cluster to the host cluster if enabled. - syncer: Added leader election to the syncer pod
- chart: vcluster can now be used without specifying a persistent volume claim
- chart:
volumescan now be configured in the vcluster chart - chart:
replicascan now be configured in the vcluster chart - chart:
nodeSelector,affinityandtolerationscan now be configured in the vcluster chart (#34) - chart:
syncer.livenessProbeandsyncer.readinessProbecan now be configured in the helm chart - chart: statefulset
labelsandannotationscan now be configured in the helm chart