Skip to content

v0.5.0-rc.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@FabianKramm FabianKramm released this 05 Jan 07:55
· 3073 commits to main since this release
16effd5

!! BREAKING CHANGES !!

vcluster will now deploy coredns itself instead of depending on the k3s coredns deployment. This makes it possible to customize the coredns deployment (e.g. for rootless mode) and also support other kubernetes distributions besides k3s. However, this will break the current coredns deployment created by k3s.

This means that after you have upgraded vcluster from an v0.4.x version, you need to delete the coredns deployment inside vcluster and then restart vcluster by deleting the vcluster pod to let it redeploy the correct coredns deployment:

# Delete coredns deployment inside vcluster
export KUBECONFIG=vcluster-kubeconfig.yaml
kubectl delete deployment coredns -n kube-system

# Restart vcluster by deleting its pod
export KUBECONFIG=host-kubeconfig.yaml
kubectl delete pod vcluster-pod-0 -n vcluster-namespace

Support for k0s and vanilla k8s virtual Kubernetes Clusters

vcluster now supports creating k0s and vanilla k8s virtual Kubernetes clusters instead of k3s. You can now specify the target virtual Kubernetes cluster distribution via the --distro flag in vcluster create. For vanilla k8s there is now also a high availability mode.

Examples:

# Create a virtual k3s Kubernetes cluster
vcluster create my-vcluster -n my-vcluster

# Create a virtual k0s Kubernetes cluster 
vcluster create my-vcluster -n my-vcluster --distro k0s

# Create a virtual k8s Kubernetes cluster with kubernetes version v1.20
vcluster create my-vcluster -n my-vcluster --distro k8s --kubernetes-version v1.20

Support for NetworkPolicies

vcluster is now able to sync networkpolicies created within the vcluster to the host cluster. To enable networkpolicies, create a values.yaml with:

rbac:
  role:
    extended: true

syncer:
  extraArgs:
  - --sync=networkpolicies

and then create the vcluster with:

vcluster create my-vcluster -n my-vcluster -f values.yaml

Other Changes

  • cli: Added support for k8s v1.23
  • cli: Deprecation of vcluster create flags --release-values and --k3s-image. Use --extra-values instead
  • cli: Changed default value of vcluster create flag --upgrade from true to false. vcluster will not try to upgrade an existing vcluster by default anymore
  • cli: New flag --kubernetes-version for vcluster create to override the kubernetes version used for creating the vcluster.
  • chart: New helm chart to deploy vcluster with k0s instead of k3s (#167) (see docs for more information)
  • chart: New helm chart to deploy vcluster with vanilla k8s instead of k3s (see docs for more information)
  • chart: Added support for rootless mode (see docs for more information)
  • chart: New option defaultImageRegistry that allows you to specify an image registry that should be prepended to all deployed system pods by vcluster
  • chart: Added support for openshift v4 for k3s distro
  • syncer: Renamed flag --fake-kubelets to --disable-fake-kubelets that makes it easier to understand how to disable fake kubelets as they are enabled by default. --fake-kubelets still exists and will be migrated automatically
  • syncer: New flag --sync that defines enabled or disabled sync controllers similar to --controllers of kube-controller-manager. Examples:
    • Default sync resources: --sync=''
    • Disable ingresses: --sync=-ingresses
    • Sync real nodes: --sync=nodes
    • Sync real persistent volumes: --sync=persistentvolumes
    • Sync storage classes and persistent volumes: --sync=storageclasses,persistentvolumes
    • Synced by default: secrets,services,configmaps,endpoints,events,fake-persistentvolumes,ingresses,persistentvolumeclaims,pods,fake-nodes
    • All available options: secrets,services,configmaps,endpoints,events,fake-persistentvolumes,ingresses,nodes,persistentvolumeclaims,priorityclasses,pods,fake-nodes,persistentvolumes,storageclasses
  • syncer: Deprecated flags --fake-kubelets, --disable-sync-resources, --enable-priority-classes, --enable-storage-classes, --fake-nodes and --fake-persistent-volumes
  • syncer: New flag --name that specifies the vcluster name (replaces --suffix)
  • syncer: vcluster will now expose the ca cert, client cert and client key in the kube config secret (thanks @janwillies) (#226)
  • syncer: Fixed an issue where pod service link variables could be duplicated
  • syncer: Deprecated flag --suffix, use --name instead
  • syncer: Flag --service-name now defaults to --name if omitted
  • syncer: Flag --set-owner now defaults to true and vcluster does not fail if setting the owner is not possible
  • syncer: Fixed an issue where healthCheckNodePort was not correctly synced (#240)
  • syncer: Fixed an issue where nodes wouldn't get deleted correctly
  • syncer: Fixed an issue where vcluster would return a conflict error instead of already exists during service create
  • syncer: Fixed an error where vcluster would not correctly sync nodes and create node services (#214)
  • syncer: Removed flag --service-namespace as this would break vcluster if it's not the same value as current vcluster namespace
  • syncer: Fixed an issue where glusterfs volume endpoints would not get correctly translated
  • syncer: Fixed an issue where vcluster couldn't find the current pod if the flag --target-namespace was provided (#214)
  • syncer: New flag --leader-elect that defaults to false to avoid unnecessary leader election
  • build: Removed file name from the sha256 files (thanks @developer-guy)