Red Hat Bugzilla – Bug 1452092
no kind "AdmissionConfiguration" is registered for version "apiserver.k8s.io/v1alpha1"
Last modified: 2017-08-16 15:51 EDT
Description of problem: In ocp35 we can configure PodNodeSelector admission controller in master-config.yaml like below: admissionConfig: pluginConfig: PodNodeSelector: location: admission-control-config-file.cfg # cat admission-control-config-file.cfg podNodeSelectorPluginConfig: clusterDefaultNodeSelector: region=west But now in ocp36(v3.6.74), this failed with error: "start_master.go:112] Object 'Kind' is missing in '{"podNodeSelectorPluginConfig":{"clusterDefaultNodeSelector":"region=west"}}'" I notice there is a pr to support versioned configuration: https://github.com/kubernetes/kubernetes/pull/39109 According to the new file type, I try to configure like: apiVersion: apiserver.k8s.io/v1alpha1 kind: AdmissionConfiguration plugins: - name: "PodNodeSelector:" configuration: apiVersion: podnodeselector.admission.k8s.io/v1alpha1 kind: Configuration podNodeSelectorPluginConfig: clusterDefaultNodeSelector: region=west or apiVersion: apiserver.k8s.io/v1alpha1 kind: AdmissionConfiguration plugins: - name: "PodNodeSelector:" configuration: apiVersion: podnodeselector.admission.k8s.io/v1alpha1 kind: Configuration clusterDefaultNodeSelector: region=west But both I get another error: start_master.go:112] no kind "AdmissionConfiguration" is registered for version "apiserver.k8s.io/v1alpha1" Version-Release number of selected component (if applicable): openshift v3.6.74 kubernetes v1.6.1+5115d708d7 etcd 3.1.0 How reproducible: Always Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
The old format is actually supposed to work, but doesn't due to a bug. Here is a PR to allow legacy admission plugin config without a Kind: https://github.com/openshift/origin/pull/14272
Fixed on origin master.
Verified on openshift v3.6.106 1. Configure PodNodeSelector admission controller like below and it works well. admissionConfig: pluginConfig: PodNodeSelector: location: admission-control-config-file.cfg # cat admission-control-config-file.cfg podNodeSelectorPluginConfig: clusterDefaultNodeSelector: region=west 2. If admission-control-config-file.cfg contain AdmissionConfiguration restart master service, no error admissionConfig: pluginConfig: PodNodeSelector: location: admission-control-config-file.cfg # cat admission-control-config-file.cfg apiVersion: apiserver.k8s.io/v1alpha1 kind: AdmissionConfiguration plugins: - name: "PodNodeSelector" configuration: apiVersion: podnodeselector.admission.k8s.io/v1alpha1 kind: Configuration podNodeSelectorPluginConfig: clusterDefaultNodeSelector: region=west
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1716