Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

controller-manager crash by no matches for kind WorkloadRebalancer #4927

Closed
Patrick0308 opened this issue May 10, 2024 · 3 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Patrick0308
Copy link

What happened:
karmada-controller-manager pod crash.
The log :

E0510 09:58:40.249520       1 kind.go:63] "controller-runtime/source/EventHandler: if kind is a CRD, it should be installed before calling Start" err="no matches for kind \"WorkloadRebalancer\" in version \"apps.karmada.io/v1alpha1\"" kind="WorkloadRebalancer.apps.karmada.io"
E0510 09:58:46.645722       1 controller.go:203] "Could not wait for Cache to sync" err="failed to wait for workload-rebalancer caches to sync: timed out waiting for cache to be synced for Kind *v1alpha1.WorkloadRebalancer" controller="workload-rebalancer" controllerGroup="apps.karmada.io" controllerKind="WorkloadRebalancer"

In 1.9.1 There isn't WorkloadRebalancer CRD.

What you expected to happen:
Should be running
How to reproduce it (as minimally and precisely as possible):
Install by helm
Anything else we need to know?:

Environment:

  • Karmada version: v1.9.1
  • kubectl-karmada or karmadactl version (the result of kubectl-karmada version or karmadactl version):
  • Others:
@Patrick0308 Patrick0308 added the kind/bug Categorizes issue or PR as related to a bug. label May 10, 2024
@XiShanYongYe-Chang
Copy link
Member

Ask the feature owner to help take a look.
/cc @chaosi-zju

@chaosi-zju
Copy link
Member

Hi @Patrick0308, I installed Karmada v1.9.1 by following steps, and didn't encounter such problems.

VERSION=v1.9.1
CHARTDIR=/directory/to/your/chart

# 1. clean old Kind clusters
kind delete clusters karmada-host member1 member2 member3
rm -rf ~/.karmada ~/.kube/karmada*config /etc/karmada

# 2. create karmada-host cluster by Kind
hack/create-cluster.sh karmada-host ~/.kube/karmada-host.config

# 3. get host network ip (node ip) from kube-apiserver, and then add this ip to values.yaml as SAN of certificate
export KUBECONFIG=~/.kube/karmada-host.config
HOST_IP=$(kubectl get ep kubernetes -o jsonpath='{.subsets[0].addresses[0].ip}')
sed -i'' -e "/localhost/{n;s/      \"127.0.0.1/      \"${HOST_IP}\",\n&/g}" ${CHARTDIR}/values.yaml

# 4. install karmada in host cluster by helm
helm install karmada -n karmada-system \
  --kubeconfig ~/.kube/karmada-host.config \
  --create-namespace \
  --dependency-update \
  --set apiServer.hostNetwork=true \
  ${CHARTDIR}

The workload-rebalancer CRDs is introduced after v.1.10 version, it shouldn't appear in v1.9.1 version controller-manager images, are you sure you are using v1.9.1 version image? And can you compare my steps to yours to check which step may be problematic?

@Patrick0308
Copy link
Author

Sorry, I know the cause of this issue.
I'd like installing v1.9.1 by helm. And I not found this revision on helm repo. So I install it by local repo.

git clone https://github.com/karmada-io/karmada.git
git checkout v1.9.1
helm install karmada -n karmada-system --create-namespace --dependency-update ./charts/karmada

However the chart still use latest image tag on default yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
Status: No status
Development

No branches or pull requests

3 participants