vCluster - Create fully functional virtual Kubernetes clusters - Each vcluster runs inside a namespace of the underlying k8s cluster. It's cheaper than creating separate full-blown clusters and it offers better multi-tenancy and isolation than regular namespaces.
$ kf get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
vcluster-loadbalancer LoadBalancer 172.20.111.146 a0b6ab5891bfe4d82a01b8c07eb7a238-104005730.us-west-2.elb.amazonaws.com 443:30924/TCP 65s
$ vcluster create dev8 -n dev8 -f values.yaml
[info] execute command: helm upgrade dev8 vcluster --repo https://charts.loft.sh --version 0.5.0-beta.0 --kubeconfig /tmp/295948009 --namespace dev8 --install --repository-config='' --values /tmp/2738491821 --values values.yaml
[done] √ Successfully created virtual cluster dev8 in namespace dev8. Use 'vcluster connect dev8 --namespace dev8' to access the virtual cluster
Check Pod
$ kf get pod
NAME READY STATUS RESTARTS AGE
coredns-6ff7df994d-44pqg-x-kube-system-x-dev8 1/1 Running 0 49s
dev8-0 2/2 Running 1 3m35s
Connect cluster
$ vcluster connect dev8 -n dev8 --server=https://a0b6ab5891bfe4d82a01b8c07eb7a238-104005730.us-west-2.elb.amazonaws.com
[done] √ Virtual cluster kube config written to: ./kubeconfig.yaml. You can access the cluster via `kubectl --kubeconfig ./kubeconfig.yaml get namespaces`
Get nodes
$ kf get node
NAME STATUS ROLES AGE VERSION
ip-10-0-118-137.us-west-2.compute.internal Ready <none> 30m v1.21.6
ip-10-0-145-146.us-west-2.compute.internal Ready <none> 29m v1.21.6
ip-10-0-149-193.us-west-2.compute.internal Ready <none> 29m v1.21.6
ip-10-0-150-158.us-west-2.compute.internal Ready <none> 28m v1.21.6
ip-10-0-188-69.us-west-2.compute.internal Ready <none> 29m v1.21.6
Export kubeconfig
$ export KUBECONFIG=./kubeconfig.yaml
Issue of syncing nodes
$ kf get node
No resources found
$ kf get pod -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-6ff7df994d-44pqg 0/1 Pending 0 6m6s
Check Args
$ kubectl get statefulset -n dev8 dev8 -o jsonpath='{.spec.template.spec.containers[?(@.name=="syncer")].args}'
["--name=dev8","--tls-san=a0b6ab5891bfe4d82a01b8c07eb7a238-104005730.us-west-2.elb.amazonaws.com","--sync=nodes"]
As discussed in Slack, adding the --sync-all-nodes flag to .syncer.extraArgs in values.yaml solved the problem.
Feel free to reopen the issue if I misunderstood something.
vcluster version
Steps:
--sync=nodes