Issue
When creating Federated resources from the management cluster. The resources does not propagate to the target clusters.
Inspecting the logs of kubefed-controller
, shows entries similar to:
E0217 02:24:38.716654 1 controller.go:223] Unable to start sync controller for "FederatedIngress" due to missing FederatedTypeConfig for namespaces: Unable to find "kube-federation-system/namespaces" in the informer cache
E0217 02:24:38.717910 1 controller.go:223] Unable to start sync controller for "FederatedLimitRange" due to missing FederatedTypeConfig for namespaces: Unable to find "kube-federation-system/namespaces" in the informer cache
E0217 02:24:38.720138 1 controller.go:223] Unable to start sync controller for "FederatedNetworkPolicy" due to missing FederatedTypeConfig for namespaces: Unable to find "kube-federation-system/namespaces" in the informer cache
E0217 02:24:38.721237 1 controller.go:223] Unable to start sync controller for "FederatedResourceQuota" due to missing FederatedTypeConfig for namespaces: Unable to find "kube-federation-system/namespaces" in the informer cache
E0217 02:24:38.722400 1 controller.go:223] Unable to start sync controller for "FederatedRoleBinding" due to missing FederatedTypeConfig for namespaces: Unable to find "kube-federation-system/namespaces" in the informer cache
E0217 02:24:38.723577 1 controller.go:223] Unable to start sync controller for "FederatedRole" due to missing FederatedTypeConfig for namespaces: Unable to find "kube-federation-system/namespaces" in the informer cache
And checking the FederatedTypeConfig
confirms the missing FederatedTypeConfig
In the example below, it is missing the FederatedTypeConfig
namespace
.
kubectl get federatedtypeconfig -n kube-federation-system
NAMESPACE NAME AGE
kube-federation-system clusterrolebindings.rbac.authorization.k8s.io 84m
kube-federation-system clusterroles.rbac.authorization.k8s.io 89m
kube-federation-system configmaps 89m
kube-federation-system deployments.apps 89m
kube-federation-system ingresses.networking.k8s.io 89m
kube-federation-system jobs.batch 89m
kube-federation-system limitranges 84m
kube-federation-system networkpolicies.networking.k8s.io 84m
kube-federation-system replicasets.apps 89m
kube-federation-system resourcequotas 84m
kube-federation-system rolebindings.rbac.authorization.k8s.io 84m
kube-federation-system roles.rbac.authorization.k8s.io 84m
kube-federation-system secrets 89m
kube-federation-system serviceaccounts 89m
kube-federation-system services 89m
Solution
We have to use the kubefedctl to enable/restore the missing FederatedTypeConfig. Download kubefedctl from
https://github.com/kubernetes-sigs/kubefed/releases/tag/v0.9.2
Enable the resource federation by kubefedctl enable <name_of_resource>
So in our example, the command would be
./kubefedctl enable namespace
Note: Make sure that your kubectl
KUBECONFIG
is pointed to the correct cluster.