Production-Grade Container Scheduling and Management
Go to file
Lubomir I. Ivanov 30f9893374 kubeadm: refactor the dry-run logic
The current dryrun client implemnetation is suboptimal
and sparse. It has the following problems:

- When an object CREATE or UPDATE reaches the default dryrun client
the operation is a NO-OP, which means subsequent GET calls must
fully emulate the object that exists in the store.
- There are multiple implmentations of a DryRunGetter interface
such the one in init_dryrun.go but there are no implementations
for reset, upgrade, join.
- There is a specific DryRunGetter that is backed by a real
client in clientbacked_dryrun.go, but this is used for upgrade
and does not work in conjuction with a fake client.

This commit does the following changes:

- Removes all existing *dryrun*.go implementations.
- Add a new DryRun implementation in dryrun.go that implements
3 clients - fake clientset, real clientset, real dynamic client.
- The DryRun object uses the method chaining pattern.
- Allows the user opt-in into real clients only if needed, by passing
a real kubeconfig. By default only constructs a fake client.
- The default reactor chain for the fake client, always logs the
object action, then for GET or LIST actions attempts to use the
real dynamic client to get the object. If a real object does not
exist it attempts to get the object from the fake object store.
- The user can prepend or append reactors to the chain.
- All known needed reactors for operations during init, join,
reset, upgrade are added as methods of the DryRun struct.
- Adds detailed unit test for the DryRun struct and its methods
including reactors.

Additional changes:
- Use the new DryRun implementation in all command workflows -
init, join, reset, upgrade.
- Ensure that --dry-run works even if there is no active cluster
by returning faked objects. For join, a faked cluster-info
with a fake bootstrap token and CA are used.
2024-10-11 00:15:59 +03:00
.github
api Update TrafficDistribution comment to reflect graduated beta status in v1.31 2024-09-04 22:00:57 +10:00
build Merge pull request #127283 from bzsuni/bz/etcd/image/build/v3.5.16 2024-09-13 14:31:12 +01:00
CHANGELOG CHANGELOG: Update directory for v1.30.5 release 2024-09-12 02:55:14 +00:00
cluster Build etcd image v3.5.16 2024-09-11 11:30:46 +08:00
cmd kubeadm: refactor the dry-run logic 2024-10-11 00:15:59 +03:00
docs
hack Avoid collecting dmesg when running as daemon 2024-09-23 21:32:05 -04:00
LICENSES Update cadvisor and hcsshim versions 2024-09-22 11:50:45 -07:00
logo
pkg Merge pull request #124947 from toVersus/fix/eviction-message 2024-09-24 08:58:00 +01:00
plugin wire in ctx to rbac plugins 2024-09-17 20:04:02 +03:00
staging Merge pull request #127570 from soltysh/do_not_return_err 2024-09-24 10:20:01 +01:00
test Merge pull request #127572 from soltysh/reuse_helper 2024-09-24 06:05:59 +01:00
third_party agnhost: merge registry.k8s.io/stress:v1 (github.com/vishh/stress) 2024-02-13 23:21:05 +09:00
vendor Update cadvisor and hcsshim versions 2024-09-22 11:50:45 -07:00
.generated_files
.gitattributes
.gitignore Generate go.work files 2024-02-29 00:22:06 -08:00
.go-version Bump images, dependencies and versions to go 1.23.0 2024-09-02 10:42:04 -06:00
CHANGELOG.md
code-of-conduct.md
CONTRIBUTING.md
go.mod Update cadvisor and hcsshim versions 2024-09-22 11:50:45 -07:00
go.sum Update cadvisor and hcsshim versions 2024-09-22 11:50:45 -07:00
go.work Pin godebug default to go1.23 2024-09-11 15:34:37 -04:00
go.work.sum Update cadvisor and hcsshim versions 2024-09-22 11:50:45 -07:00
LICENSE
Makefile
OWNERS
OWNERS_ALIASES Merge pull request #126760 from ncdc/ncdc/emeritus 2024-09-20 21:01:58 +01:00
README.md Get rid of most references to GOPATH 2024-02-29 22:06:51 -08:00
SECURITY_CONTACTS Update SECURITY_CONTACTS 2023-10-10 14:45:43 +00:00
SUPPORT.md

Kubernetes (K8s)

CII Best Practices Go Report Card GitHub release (latest SemVer)


Kubernetes, also known as K8s, is an open source system for managing containerized applications across multiple hosts. It provides basic mechanisms for the 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.

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.
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 the 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.