Kubernetes 1.8.10 kube-apiserver priorityclasses error

独自空忆成欢 提交于 2019-12-13 03:25:51

问题


New cluster 1.8.10 spinned with kops.

In K8S 1.8 there is a new feature Pod Priority and Preemption. More information: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#how-to-use-priority-and-preemption

kube-apiserver is logging errors

I0321 16:27:50.922589 7 wrap.go:42] GET /apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations: (140.067µs) 404 [[kube-apiserver/v1.8.10 (linux/amd64) kubernetes/044cd26] 127.0.0.1:47500] I0321 16:27:51.257756 7 wrap.go:42] GET /apis/scheduling.k8s.io/v1alpha1/priorityclasses?resourceVersion=0: (168.391µs) 404 [[kube-apiserver/v1.8.10 (linux/amd64) kubernetes/044cd26] 127.0.0.1:47500] E0321 16:27:51.258176 7 reflector.go:205] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:73: Failed to list *scheduling.PriorityClass: the server could not find the requested resource (get priorityclasses.scheduling.k8s.io)

I quite not understand why. No one should access it as it's not even enabled yet (it's alpha).

No pod is using priorityClassName.

Running explain:

kubectl explain priorityclass error: API version: scheduling.k8s.io/v1alpha1 is not supported by the server. Use one of: [apiregistration.k8s.io/v1beta1 extensions/v1beta1 apps/v1beta1 apps/v1beta2 authentication.k8s.io/v1
authentication.k8s.io/v1beta1 authorization.k8s.io/v1 authorization.k8s.io/v1beta1 autoscaling/v1 autoscaling/v2beta1 batch/v1 batch/v1beta1 certificates.k8s.io/v1beta1 networking.k8s.io/v1 policy/ v1beta1 rbac.authorization.k8s.io/v1 rbac.authorization.k8s.io/v1beta1 storage.k8s.io/v1 storage.k8s.io/v1beta1 apiextensions.k8s.io/v1beta1 v1]

Is this normal or kops specific?


回答1:


I think it is related to that Kops option in its config (kops get --name $NAME -oyaml):

kubeAPIServer:
  runtimeConfig:
    admissionregistration.k8s.io/v1alpha1: "true"

Anyway, all components working thru the API server and it is not a surprise that sometimes based on configuration it is trying to call some disable features. At least it has to check which APIs a supported, so why :)

So, I think you don't need to worry about it, that is the configuration-related message. Don't worry about it. Or just enable that feature, it will solve warning messages.



来源:https://stackoverflow.com/questions/49423810/kubernetes-1-8-10-kube-apiserver-priorityclasses-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!