Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Kubelet without Docker #1546

Conversation

mattjmcnaughton
Copy link
Contributor

@mattjmcnaughton mattjmcnaughton commented Feb 9, 2020

A KEP proposing supporting building a Kubelet without any "Docker-specific" code or dependency on the docker/docker Golang library, via the use of build tags.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/node Categorizes an issue or PR as relevant to SIG Node. labels Feb 9, 2020
Copy link
Contributor Author

@mattjmcnaughton mattjmcnaughton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dims there were a couple of open questions I had left over from our conversation that I tagged you in - thanks :)

keps/sig-node/20200205-build-kubelet-without-docker.md Outdated Show resolved Hide resolved
keps/sig-node/20200205-build-kubelet-without-docker.md Outdated Show resolved Hide resolved
@mattjmcnaughton
Copy link
Contributor Author

cc @derekwaynecarr @dchen1107

@dims and I had some chats about the benefits of this workstream. Would love to know y'alls thoughts on next steps?

cc @BenTheElder would be curious to get your opinion/expertise given your work on this w/ sig-cloud-provider.

@mattjmcnaughton
Copy link
Contributor Author

/retest

@mattjmcnaughton mattjmcnaughton force-pushed the mattjmcnaughton/kep-build-kubelet-wo-docker branch from 4b387b8 to 47b3939 Compare February 9, 2020 23:08
Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick skim 👀

@derekwaynecarr
Copy link
Member

An alternative to consider:

  • announce deprecation of dockershim
  • identify gaps to CRI v1 and set a goal for 1.21
  • removal of dockershim with CRI v1

Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove unused optional headings; remove [optional] mark from optional headings that are selected.

keps/sig-node/20200205-build-kubelet-without-docker.md Outdated Show resolved Hide resolved
keps/sig-node/20200205-build-kubelet-without-docker.md Outdated Show resolved Hide resolved
keps/sig-node/20200205-build-kubelet-without-docker.md Outdated Show resolved Hide resolved
keps/sig-node/20200205-build-kubelet-without-docker.md Outdated Show resolved Hide resolved
keps/sig-node/20200205-build-kubelet-without-docker.md Outdated Show resolved Hide resolved
@mattjmcnaughton mattjmcnaughton force-pushed the mattjmcnaughton/kep-build-kubelet-wo-docker branch from 47b3939 to 5a60767 Compare February 19, 2020 14:17
@mattjmcnaughton
Copy link
Contributor Author

nit: remove unused optional headings; remove [optional] mark from optional headings that are selected.

Thanks - fixed these :)

@mattjmcnaughton mattjmcnaughton force-pushed the mattjmcnaughton/kep-build-kubelet-wo-docker branch from 5a60767 to ba620d6 Compare February 20, 2020 14:40
@mattjmcnaughton
Copy link
Contributor Author

Thanks for your responses @dims :) Updated my pr with your answers.

@mattjmcnaughton
Copy link
Contributor Author

/assign @dchen1107 @derekwaynecarr @Random-Liu

From conversations with @dims, I think this KEP is ready for review when y'all get the chance. I will be working on getting the POC PR in a mergeable state in parallel. Thanks :)

@dims
Copy link
Member

dims commented Mar 26, 2020

/milestone v1.19

@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Mar 26, 2020
@neolit123
Copy link
Member

/cc

@mattjmcnaughton
Copy link
Contributor Author

we need to be cautious about removing Docker support entirely from the kubelet.

while managed solutions and Kubernetes distributions can opt-out of using Docker on their nodes, the wider public is still using Docker. by dropping Docker support the Kubernetes project will be reducing it's ease of consumption.

in a follow up KEP i think we should discuss how the dockershim binary can be separated from the kubelet, managed in separate repository (ideally with community help) and distributed by the Kubernetes project as part of its release.

some numbers from the last kubeadm survey:
https://docs.google.com/forms/d/1A855D054FZfdvNbx6mAa54tcZ204GmPCIhxe1UrXKd8/edit

kubeadm-suervey

Thanks for that additional data! Definite +1 from me that we want to be very careful about the path forward to actually remove Docker support entirely from the Kubelet. It requires more discussion and thought. Hopefully this KEP makes testing out different paths, and ultimately pursuing one, easier.

@neolit123
Copy link
Member

thank you for helping with this effort @mattjmcnaughton

@mattjmcnaughton mattjmcnaughton force-pushed the mattjmcnaughton/kep-build-kubelet-wo-docker branch from 3586aa0 to a85ae0e Compare March 26, 2020 23:45
@mattjmcnaughton
Copy link
Contributor Author

thank you for helping with this effort @mattjmcnaughton

My pleasure, thanks for adding your insights :)

@mattjmcnaughton mattjmcnaughton force-pushed the mattjmcnaughton/kep-build-kubelet-wo-docker branch from a85ae0e to 8547df3 Compare March 31, 2020 20:12
Copy link
Member

@derekwaynecarr derekwaynecarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make the following updates:

  1. drop story 2
  2. add under test-criteria "creation of a pre-submit job to ensure we dont regress on dockerless build"
  3. add under test-criteria "creation of a node e2e job that passes dockerless"

the node e2e suite itself has docker deps, and so it will also want to get updated to support building a "dockerless" version so that it doesn't inadvertently regress into including them.

components. This desire leads us to our second question: is supporting
compiling a dockerless Kubelet an appropriate first step?

We argue yes. First, the work to support compiling a dockerless Kubelet will
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with everyone enumerated here.


## Proposal

We will undertake the following steps to obtain our goals. First, we will ensure
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe this impacts sig-windows, but everything here makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth adding them as a participating sig? Or just something for folks to remain cognizant of moving forward?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add it as a participating sig unless they have fully transitioned to an alternative.

Golang library, we will add automated tooling enforcing that only the
`dockershim` can depend on `docker/docker`.

One quick additional note - currently `cadvisor` also depends on the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree this is orthogonal as there is also work to eliminate/reduce cadvisor dep from kubelet itself.

keps/sig-node/20200205-build-kubelet-without-docker.md Outdated Show resolved Hide resolved
keps/sig-node/20200205-build-kubelet-without-docker.md Outdated Show resolved Hide resolved
@mattjmcnaughton
Copy link
Contributor Author

I would make the following updates:

1. drop story 2

2. add under test-criteria "creation of a pre-submit job to ensure we dont regress on dockerless build"

3. add under test-criteria "creation of a node e2e job that passes dockerless"

the node e2e suite itself has docker deps, and so it will also want to get updated to support building a "dockerless" version so that it doesn't inadvertently regress into including them.

Thanks for the feedback @derekwaynecarr - will address within the next day or two, and will ping you when I do.

A KEP proposing supporting building a Kubelet without docker, via the
use of build tags.
@mattjmcnaughton mattjmcnaughton force-pushed the mattjmcnaughton/kep-build-kubelet-wo-docker branch from 8547df3 to 60b59a5 Compare April 16, 2020 01:57
@k8s-ci-robot k8s-ci-robot added the sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. label Apr 16, 2020
@mattjmcnaughton
Copy link
Contributor Author

@derekwaynecarr I updated the testing section with the tests you requested. Please let me know if there's anything I misinterpreted or missed. I also deleted the second story.

W.r.t. kubernetes/kubernetes#87746 (the implementation PR), it currently includes the first test type, but not the second, third, and forth. Do we want to block merging the PR on having all the new tests in place, or merge the PR as is and add them later? I'm open to either path, with a slight preference for keeping PRs as small as possible :)

cc @dims

@dims
Copy link
Member

dims commented Apr 16, 2020

@mattjmcnaughton my preference is to merge this as-is and file subsequent PRs. there is no requirement that one KEP == one PR :)

Copy link
Member

@derekwaynecarr derekwaynecarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for enumerating your implementation plan.

I look forward to assisting you in making this succesful.

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 21, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: derekwaynecarr, mattjmcnaughton

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 21, 2020
@k8s-ci-robot k8s-ci-robot merged commit 394359e into kubernetes:master Apr 21, 2020
@dims
Copy link
Member

dims commented Apr 21, 2020

w00t!!! thanks @derekwaynecarr

@mattjmcnaughton mattjmcnaughton deleted the mattjmcnaughton/kep-build-kubelet-wo-docker branch April 22, 2020 00:51
@mattjmcnaughton
Copy link
Contributor Author

Wonderful news - big thanks @derekwaynecarr !

@BenTheElder
Copy link
Member

this is pretty cool :-)
looking forward to seeing how much binary size we can drop ❤️

@mattjmcnaughton
Copy link
Contributor Author

cc @dims

what, if anything, do we need to do to get this KEP included in 1.19? Re https://groups.google.com/forum/#!topic/kubernetes-dev/G5iIu3FrRTY

Or is nothing necessary because its not user facing?

@neolit123
Copy link
Member

i think this KEP can move to implementable for 1.19. the outlined work is developer facing (i.e. compile options).

@dims
Copy link
Member

dims commented Apr 29, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/node Categorizes an issue or PR as relevant to SIG Node. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants