Kubernetes, federation, kubectl get clusters No resource found

4/13/2018

I'm trying to configure placement policies in Federation clusters environment by the line of kubernetes web https://kubernetes.io/docs/tasks/federation/set-up-placement-policies-federation/

when I configured an Admission Controller in the Federation API server and enter the command:

kubectl create -f scheduling-policy-admission.yaml

when I entered:

kubectl -n federation-system edit deployment apiserver

and add the flags

--enable-admission-plugins=SchedulingPolicy
--admission-control-config-file=/etc/kubernetes/admission/config.yml

and the volumeMount:

volumeMounts:
- name: admission-config
  mountPath: /etc/kubernetes/admission

and volume

- name: admission-config
  configMap:
    name: admission

the apiserver was configured

but after it, when I enter any command belonging to the federation user like:

kubectl get nameespaces

or

kubectl get clusters

I'm getting:

No resources found.

the following commads are from the user_master( the one i created the control plane and federation user from ), from the federation user i get the same: No resources found

root@master:~# kubectl get deployments --context=<cluster_name> --all-namespaces
NAMESPACE           NAME                                                DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
federation-system   apiserver                                           1         1         1            1           1d
federation-system   controller-manager                                  1         1         1            1           1d
federation-system   opa                                                 1         1         1            0           5h
kube-system         calico-kube-controllers                             1         1         1            1           4d
kube-system         kube-dns                                            1         1         1            1           4d
kube-system         tiller-deploy                                       1         1         1            1           4d
my-namespace        coredns-coredns                                     1         1         1            1           3d
my-namespace        etcd-operator-etcd-operator-etcd-backup-operator    1         1         1            1           4d
my-namespace        etcd-operator-etcd-operator-etcd-operator           1         1         1            1           4d
my-namespace        etcd-operator-etcd-operator-etcd-restore-operator   1         1         1            1           4d


root@master:~# kubectl get rs --context=cluster-66n3 --all-namespaces
NAMESPACE           NAME                                                           DESIRED   CURRENT   READY     AGE
default             nginx-pci                                                      0         0         0         1d
federation-system   apiserver-54897c9759                                           0         0         0         12h
federation-system   apiserver-55754fbb96                                           0         0         0         12h
federation-system   apiserver-58fbbb9ddf                                           1         1         1         12h
federation-system   apiserver-59d847fbb9                                           0         0         0         12h
federation-system   apiserver-6dd8d967f6                                           0         0         0         12h
federation-system   apiserver-79f49d6db                                            0         0         0         12h
federation-system   apiserver-7b67bcccf5                                           0         0         0         12h
federation-system   apiserver-855b8f6887                                           0         0         0         12h
federation-system   apiserver-86685c4c8f                                           0         0         0         12h
federation-system   apiserver-889c85867                                            0         0         0         12h
federation-system   apiserver-c8bb586f4                                            0         0         0         12h
federation-system   controller-manager-5c4f955cc4                                  1         1         1         13h
federation-system   controller-manager-5d8577fd8b                                  0         0         0         1d
federation-system   opa-5c545ff6df                                                 1         1         0         5h
kube-system         calico-kube-controllers-5449fdfcd                              1         1         1         4d
kube-system         kube-dns-86f4d74b45                                            1         1         1         4d
kube-system         tiller-deploy-df4fdf55d                                        1         1         1         4d
my-namespace        coredns-coredns-b7574b7dd                                      1         1         1         3d
my-namespace        etcd-operator-etcd-operator-etcd-backup-operator-687bb97bfd    1         1         1         4d
my-namespace        etcd-operator-etcd-operator-etcd-operator-cdd58665b            1         1         1         4d
my-namespace        etcd-operator-etcd-operator-etcd-restore-operator-65585cb577   1         1         1         4d

and the versuin:

root@master:~# kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:55:54Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"9+", GitVersion:"v1.9.0-alpha.3", GitCommit:"85c06145286da663755b140efa2b65f793cce9ec", GitTreeState:"clean", BuildDate:"2018-02-14T12:54:40Z", GoVersion:"go1.9.1", Compiler:"gc", Platform:"linux/amd64"}

someone maybe knows why?

-- nir
kubectl
kubernetes

0 Answers