Dashboard version: v1.8.3
Kubernetes version: v1.7.9
Operating system: ubuntu
Node.js version: Don't know (using a PaaS solution so no access to VM's)
Go version: Don't know (using a PaaS solution so no access to VM's)
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
Gives error:
error: error validating "https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml": error validating data: unknown object type schema.GroupVersionKind{Group:"rbac.authorization.k8s.io", Version:"v1", Kind:"Role"}; if you choose to ignore these errors, turn validation off with --validate=false
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml --validate=false
Gives error:
secret "kubernetes-dashboard-certs" unchanged
serviceaccount "kubernetes-dashboard" unchanged
service "kubernetes-dashboard" configured
Error from server (BadRequest): error when creating "https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml": Role in version "v1" cannot be handled as a Role: no kind "Role" is registered for version "rbac.authorization.k8s.io/v1"
Error from server (BadRequest): error when creating "https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml": RoleBinding in version "v1" cannot be handled as a RoleBinding: no kind "RoleBinding" is registered for version "rbac.authorization.k8s.io/v1"
Error from server (Invalid): error when applying patch:
{"apiVersion":"apps/v1beta2","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"apps/v1beta2\",\"kind\":\"Deployment\",\"metadata\":{\"annotations\":{},\"labels\":{\"k8s-app\":\"kubernetes-dashboard\"},\"name\":\"kubernetes-dashboard\",\"namespace\":\"kube-system\"},\"spec\":{\"replicas\":1,\"revisionHistoryLimit\":10,\"selector\":{\"matchLabels\":{\"k8s-app\":\"kubernetes-dashboard\"}},\"template\":{\"metadata\":{\"labels\":{\"k8s-app\":\"kubernetes-dashboard\"}},\"spec\":{\"containers\":[{\"args\":[\"--auto-generate-certificates\"],\"image\":\"k8s.gcr.io/kubernetes-dashboard-amd64:v1.8.3\",\"livenessProbe\":{\"httpGet\":{\"path\":\"/\",\"port\":8443,\"scheme\":\"HTTPS\"},\"initialDelaySeconds\":30,\"timeoutSeconds\":30},\"name\":\"kubernetes-dashboard\",\"ports\":[{\"containerPort\":8443,\"protocol\":\"TCP\"}],\"volumeMounts\":[{\"mountPath\":\"/certs\",\"name\":\"kubernetes-dashboard-certs\"},{\"mountPath\":\"/tmp\",\"name\":\"tmp-volume\"}]}],\"serviceAccountName\":\"kubernetes-dashboard\",\"tolerations\":[{\"effect\":\"NoSchedule\",\"key\":\"node-role.kubernetes.io/master\"}],\"volumes\":[{\"name\":\"kubernetes-dashboard-certs\",\"secret\":{\"secretName\":\"kubernetes-dashboard-certs\"}},{\"emptyDir\":{},\"name\":\"tmp-volume\"}]}}}}\n"},"labels":{"addonmanager.kubernetes.io/mode":null,"kubernetes.io/cluster-service":null}},"spec":{"revisionHistoryLimit":10,"strategy":null,"template":{"metadata":{"labels":{"kubernetes.io/cluster-service":null}},"spec":{"$setElementOrder/containers":[{"name":"kubernetes-dashboard"}],"containers":[{"args":["--auto-generate-certificates"],"image":"k8s.gcr.io/kubernetes-dashboard-amd64:v1.8.3","livenessProbe":{"httpGet":{"path":"/","port":8443,"scheme":"HTTPS"},"initialDelaySeconds":30,"timeoutSeconds":30},"name":"kubernetes-dashboard","ports":[{"containerPort":8443,"protocol":"TCP"}],"volumeMounts":[{"mountPath":"/certs","name":"kubernetes-dashboard-certs"},{"mountPath":"/tmp","name":"tmp-volume"}]},{"$patch":"delete","name":"main"}],"nodeSelector":null,"serviceAccountName":"kubernetes-dashboard","tolerations":[{"effect":"NoSchedule","key":"node-role.kubernetes.io/master"}],"volumes":[{"name":"kubernetes-dashboard-certs","secret":{"secretName":"kubernetes-dashboard-certs"}},{"emptyDir":{},"name":"tmp-volume"}]}}}}
to:
&{0xc4200d4480 0xc420151dc0 kube-system kubernetes-dashboard https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml 0xc42000c280 0xc42000c698 416 false}
for: "https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml": Deployment.apps "kubernetes-dashboard" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"k8s-app":"kubernetes-dashboard"}: selector does not match template labels
Dashboard not deployed
For the dashboard to be deployed
have a new installed AKS cluster and I know the dashboard is already running on the cluster by default, but it is using a different/lower version of the dashboard:
k8s-gcrio.azureedge.net/kubernetes-dashboard-amd64:v1.6.3
And I would like to use this version.
Hi,
Getting the following error
The Deployment "kubernetes-dashboard" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"k8s-app":"kubernetes-dashboard"}: `selector` does not match template `labels`
Kubernetes version:
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:17:39Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.4", GitCommit:"bf9a868e8ea3d3a8fa53cbb22f566771b3f8068b", GitTreeState:"clean", BuildDate:"2018-10-25T19:06:30Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
@floreks
Hello,
I've an error too with the deployement of the dashboard
When I do the 'apply' I've got an ImagePullError
imeniyu@ns:~$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/deploy/alterna
tive/kubernetes-dashboard.yaml
serviceaccount/kubernetes-dashboard unchanged
role.rbac.authorization.k8s.io/kubernetes-dashboard-minimal configured
rolebinding.rbac.authorization.k8s.io/kubernetes-dashboard-minimal unchanged
deployment.apps/kubernetes-dashboard created
service/kubernetes-dashboard configured
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-86c58d9df4-8ldlv 1/1 Running 0 44m
kube-system coredns-86c58d9df4-nfwgf 1/1 Running 0 44m
kube-system etcd-ns3117727 1/1 Running 0 43m
kube-system kube-apiserver-ns3117727 1/1 Running 0 43m
kube-system kube-controller-manager-ns3117727 1/1 Running 0 43m
kube-system kube-flannel-ds-amd64-xnlnm 1/1 Running 0 20m
kube-system kube-proxy-hr6p6 1/1 Running 0 44m
kube-system kube-scheduler-ns3117727 1/1 Running 0 43m
kube-system kubernetes-dashboard-7f75b79c47-jlrhg 0/1 ImagePullBackOff 0 5m22s
Can you help me ?
I do it Yesterday and it work but today I can't pull it.
Thanks
+1 for error :-
The Deployment "kubernetes-dashboard" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"k8s-app":"kubernetes-dashboard"}: selector does not match template labels
any1?
@PriyankaGupta05 running helm upgrade --force helped me. Credit: https://github.com/helm/charts/pull/13545#issuecomment-491135192
This solution applies only to those who installed dashboard via helm. I'm still leaving it here just in case, because I googled the same error and ended up in this issue myself.
+1 for error :-
The Deployment "kubernetes-dashboard" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"k8s-app":"kubernetes-dashboard"}:
selectordoes not match templatelabels
any1?
I have resolved this issue by kuberctl delete -f kubernetes-dashboard.yaml. Then apply it again.
Having the same problem on Kubernetes-version 1.14.8.
+1 for error :-
The Deployment "kubernetes-dashboard" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"k8s-app":"kubernetes-dashboard"}:selectordoes not match templatelabels
any1?I have resolved this issue by
kubectl delete -f kubernetes-dashboard.yaml. Then apply it again.
This was the solution for me as well (watch the minor typo, kubeRctl instead of kubectl (fixed in quote)
Most helpful comment
+1 for error :-
The Deployment "kubernetes-dashboard" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"k8s-app":"kubernetes-dashboard"}:
selectordoes not match templatelabelsany1?