* feat(debug): add more profiles Signed-off-by: Jian Zeng <anonymousknight96@gmail.com> * feat(debug): implment serveral debugging profiles Including `general`, `baseline` and `restricted`. I plan to add more profiles afterwards, but I'd like to get early reviews. Signed-off-by: Jian Zeng <anonymousknight96@gmail.com> * test: add some basic tests Signed-off-by: Jian Zeng <anonymousknight96@gmail.com> * chore: add some helper functions Signed-off-by: Jian Zeng <anonymousknight96@gmail.com> * ensure pod copies always get their probes cleared not wanting probes to be present is something we want for all the debug profiles; so an easy place to implement this is at the time of pod copy generation. * ensure debug container in pod copy is added before the profile application The way that the container list modification was defered causes the debug container to be added after the profile applier runs. We now make sure to have the container list modification happen before the profile applier runs. * make switch over pod copy, ephemeral, or node more clear * use helper functions added a helper function to modify a container out of a list that matches the provided container name. also added a helper function that adds capabilities to container security. * add tests for the debug profiles * document new debugging profiles in command line help text * add file header to profiles_test.go * remove URL to KEP from help text * move probe removal to the profiles * remove mustNewProfileApplier in tests * remove extra whiteline from import block * remove isPodCopy helper func * switch baselineProfile to using the modifyEphemeralContainer helper * rename addCap to addCapability, and don't do deep copy * fix godoc on modifyEphemeralContainer * export DebugOptions.Applier for extensibility * fix unit test * fix spelling on overriden * remove debugStyle facilities * inline setHostNamespace helper func * remove modifyContainer, modifyEphemeralContainer, and remove probes their logic have been in-lined at call sites * remove DebugApplierFunc convenience facility * fix baseline profile implementation it shouldn't have SYS_PTRACE base on https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/1441-kubectl-debug#profile-baseline * remove addCapability helper, in-lining at call sites * address Arda's code review comments 1 use Bool instead of BoolPtr (now deprecated) 2 tweak for loop to continue when container name is not what we expect 3 use our knowledge on how the debug container is generated to simplify our modification to the security context 4 use our knowledge on how the pod for node debugging is generated to no longer explicit set pod's HostNework, HostPID and HostIPC fields to false * remove tricky defer in generatePodCopyWithDebugContainer * provide helper functions to make debug profiles more readable * add note to remind people about updating --profile's help text when adding new profiles * Implement helper functions with names that improve readability * add styleUnsupported to replace debugStyle(-1) * fix godoc on modifyContainer * drop style prefix from debugStyle values * put VisitContainers in podutils & use that from debug * cite source for ContainerType and VisitContainers * pull in AllContainers ContainerType value * have VisitContainer take pod spec rather than pod * in-line modifyContainer * unexport helper funcs * put debugStyle at top of file * merge profile_applier.go into profile.go * tweak dropCapabilities * fix allowProcessTracing & add a test for it * drop mask param from help funcs, since we can already unambiguous identify the container by name * fix grammar in code comment --------- Signed-off-by: Jian Zeng <anonymousknight96@gmail.com> Co-authored-by: Jian Zeng <anonymousknight96@gmail.com> |
||
---|---|---|
.github | ||
api | ||
build | ||
CHANGELOG | ||
cluster | ||
cmd | ||
docs | ||
hack | ||
LICENSES | ||
logo | ||
pkg | ||
plugin | ||
staging | ||
test | ||
third_party | ||
vendor | ||
.generated_files | ||
.gitattributes | ||
.gitignore | ||
.go-version | ||
.golangci.yaml | ||
CHANGELOG.md | ||
code-of-conduct.md | ||
CONTRIBUTING.md | ||
go.mod | ||
go.sum | ||
LICENSE | ||
Makefile | ||
OWNERS | ||
OWNERS_ALIASES | ||
README.md | ||
SECURITY_CONTACTS | ||
SUPPORT.md |
Kubernetes (K8s)

Kubernetes, also known as K8s, is an open source system for managing containerized applications across multiple hosts. It provides basic mechanisms for deployment, maintenance, and scaling of applications.
Kubernetes builds upon a decade and a half of experience at Google running production workloads at scale using a system called Borg, combined with best-of-breed ideas and practices from the community.
Kubernetes is hosted by the Cloud Native Computing Foundation (CNCF). If your company wants to help shape the evolution of technologies that are container-packaged, dynamically scheduled, and microservices-oriented, consider joining the CNCF. For details about who's involved and how Kubernetes plays a role, read the CNCF announcement.
To start using K8s
See our documentation on kubernetes.io.
Try our interactive tutorial.
Take a free course on Scalable Microservices with Kubernetes.
To use Kubernetes code as a library in other applications, see the list of published components.
Use of the k8s.io/kubernetes
module or k8s.io/kubernetes/...
packages as libraries is not supported.
To start developing K8s
The community repository hosts all information about building Kubernetes from source, how to contribute code and documentation, who to contact about what, etc.
If you want to build Kubernetes right away there are two options:
You have a working Go environment.
mkdir -p $GOPATH/src/k8s.io
cd $GOPATH/src/k8s.io
git clone https://github.com/kubernetes/kubernetes
cd kubernetes
make
You have a working Docker environment.
git clone https://github.com/kubernetes/kubernetes
cd kubernetes
make quick-release
For the full story, head over to the developer's documentation.
Support
If you need support, start with the troubleshooting guide, and work your way through the process that we've outlined.
That said, if you have questions, reach out to us one way or another.
Community Meetings
The Calendar has the list of all the meetings in Kubernetes community in a single location.
Adopters
The User Case Studies website has real-world use cases of organizations across industries that are deploying/migrating to Kubernetes.
Governance
Kubernetes project is governed by a framework of principles, values, policies and processes to help our community and constituents towards our shared goals.
The Kubernetes Community is the launching point for learning about how we organize ourselves.
The Kubernetes Steering community repo is used by the Kubernetes Steering Committee, which oversees governance of the Kubernetes project.
Roadmap
The Kubernetes Enhancements repo provides information about Kubernetes releases, as well as feature tracking and backlogs.