Closed sergeimonakhov closed 2 years ago
@D1abloRUS can you run kubectl get pods
in the namespace where the Cluster CR is created, I can't seem to see anything in the logs that would show what's going on. This looks like the pods for the control plane aren't going healthy. Once you list pods you will probably see a failing pod, if you could log that and paste those that would be helpful.
@christopherhein
E0727 09:54:40.201172 1 nestedcontrolplane_controller.go:89] controllers/controlplane/NestedControlPlane "msg"="Failed to retrieve owner Cluster from the API Server" "error"=null "nestedcontrolplane"={"Namespace":"default","Name":"cluster-sample-control-plane"}
I0727 09:54:40.206572 1 nestedcontrolplane_controller.go:74] controllers/controlplane/NestedControlPlane "msg"="Reconciling NestedControlPlane..." "nestedcontrolplane"={"Namespace":"default","Name":"cluster-sample-control-plane"}
E0727 09:54:40.206675 1 nestedcontrolplane_controller.go:89] controllers/controlplane/NestedControlPlane "msg"="Failed to retrieve owner Cluster from the API Server" "error"=null "nestedcontrolplane"={"Namespace":"default","Name":"cluster-sample-control-plane"}
I0727 09:54:40.217607 1 nestedcontrolplane_controller.go:74] controllers/controlplane/NestedControlPlane "msg"="Reconciling NestedControlPlane..." "nestedcontrolplane"={"Namespace":"default","Name":"cluster-sample-control-plane"}
E0727 09:54:40.217715 1 nestedcontrolplane_controller.go:89] controllers/controlplane/NestedControlPlane "msg"="Failed to retrieve owner Cluster from the API Server" "error"=null "nestedcontrolplane"={"Namespace":"default","Name":"cluster-sample-control-plane"}
kubectl get pod
No resources found in default namespace.
kubectl get cluster
NAME PHASE
cluster-sample Provisioning
No resource is created for the nested control plane
Can you check statefulsets? also events?
kubectl get statefulsets.apps
No resources found in default namespace.
events empty
Seems the controller failed to create the statefulset for tenant cluster, not sure when this case will happen, like in which case we will get the owner has not been set yet, will retry later
error? @christopherhein
// 1. check if the ownerreference has been set by the
// NestedControlPlane controller.
owner := getOwner(nkas.ObjectMeta)
if owner == (metav1.OwnerReference{}) {
// requeue the request if the owner NestedControlPlane has
// not been set yet.
log.Info("the owner has not been set yet, will retry later",
"namespace", nkas.GetNamespace(),
"name", nkas.GetName())
return ctrl.Result{Requeue: true}, nil
}
@D1abloRUS have you figured out the causes?
@D1abloRUS have you figured out the causes?
I don't have time for this yet
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/reopen
/remove-lifecycle rotten
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
@k8s-triage-robot: Closing this issue.
What steps did you take and what happened: Hi! I followed this instruction: https://github.com/kubernetes-sigs/cluster-api-provider-nested/tree/main/docs but nested cluster not creating
logs capi-kubeadm-bootstrap-controller-manager:
capi-controller-manager:
capn-nested-control-plane-controller-manager:
capn-controller-manager:
cluster-sample:
What did you expect to happen:
Anything else you would like to add: The problem here, as I understand it: https://github.com/kubernetes-sigs/cluster-api-provider-nested/blob/ea5f01bb8367b336f56ffa0239bffa9e09f560bb/controlplane/nested/controllers/nestedapiserver_controller.go#L83
https://github.com/kubernetes-sigs/cluster-api-provider-nested/blob/d2f95df415d0af011094633f27258c4ab812a170/controlplane/nested/controllers/nestedetcd_controller.go#L84
https://github.com/kubernetes-sigs/cluster-api-provider-nested/blob/d2f95df415d0af011094633f27258c4ab812a170/controlplane/nested/controllers/nestedcontrollermanager_controller.go#L78
Environment:
v0.1.0
kubectl version
):/etc/os-release
):/kind bug