docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.43k stars 117 forks source link

Enable Kubernetes Initializers #2771

Open mikecutalo opened 6 years ago

mikecutalo commented 6 years ago

Please, check https://docs.docker.com/docker-for-mac/troubleshoot/. Issues without logs and details cannot be debugged, and will be closed.

Expected behavior

To be able to use Kubernetes Initializers

Actual behavior

Unable to create an Kubernetes Initializer

Information

Docker for Mac: (Edge) 18.03.0-ce-mac58 (23607)
OS X: 10.13.4

 ➜  kubectl version
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.2", GitCommit:"5fa2db2bd46ac79e5e00a4e6ed24191080aa463b", GitTreeState:"clean", BuildDate:"2018-01-18T10:09:24Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.2", GitCommit:"5fa2db2bd46ac79e5e00a4e6ed24191080aa463b", GitTreeState:"clean", BuildDate:"2018-01-18T09:42:01Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}

I had noticed that the docker-for-mac kubernetes implementation does have some flags set for kubernetes Initializers eg: --admission-control=Initializers However there is still an additional flag that needs to be set for the kube-apiserver like so --feature-gates="Initializers=true" and --runtime-config=admissionregistration.k8s.io/v1alpha1.

Steps to reproduce the behavior

  1. Create a basic kubernetes initializerConfiguration manifest.

    apiVersion: admissionregistration.k8s.io/v1alpha1
    kind: InitializerConfiguration
    metadata:
    name: config
    initializers:
    - name: config.initializer.kubernetes.io
    rules:
      - apiGroups:
          - "*"
        apiVersions:
          - "*"
        resources:
          - deployments
  2. Create the resource in kubernetes kubectl create -f <initializer-manifest-name> Its at this point the error will occur.

➜  kubectl create -f kubeconfig-initializer.yaml
error: unable to recognize "kubeconfig-initializer.yaml": no matches for admissionregistration.k8s.io/, Kind=InitializerConfiguration
mikecutalo commented 6 years ago

Hi @guillaumerose is there any update for this?

docker-robott commented 6 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

guillaumerose commented 6 years ago

The feature here will be to allow people to edit the kubeadm.yaml used to deploy the cluster. This is in the roadmap and I wish we can work on it soon.