Patrick Ohly 88b2360540 ResourceQuota E2E: more informative failure message
When the usage information in the ResourceQuota status doesn't get updated as
expected, the previous log output and failure message didn't explain why:

    ...
    I0515 23:29:57.361485 75251 resource_quota.go:2497] resource count/resourceclaims.resource.k8s.io, expected 0, actual 1
    I0515 23:29:59.363848 75251 resource_quota.go:2497] resource count/resourceclaims.resource.k8s.io, expected 0, actual 1
    I0515 23:30:01.357948 75251 resource_quota.go:2497] resource count/resourceclaims.resource.k8s.io, expected 0, actual 1
    I0515 23:30:03.345999 75251 resource_quota.go:544] Unexpected error:
        <*fmt.wrapError | 0xc0048578a0>:
        client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline
        {
            msg: "client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline",
            err: <*errors.errorString | 0xc004b028a0>{
                s: "rate: Wait(n=1) would exceed context deadline",
            },
        }
    [FAILED] client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline
    In [It] at: k8s.io/kubernetes/test/e2e/apimachinery/resource_quota.go:544 @ 05/13/25 08:59:21.152

The actual failure is also unpredictable, preventing proper clustering in the triage
tool. Depending on where the context is checked, it can also fail with:

    [FAILED] context deadline exceeded
    In [It] at: k8s.io/kubernetes/test/e2e/apimachinery/resource_quota.go:544 @ 05/14/25 00:08:34.258

After converting to a GomegaMatcher with gomega.Eventually, it fails like
this (manually truncated a bit and triggered by changing the expected value):

    [FAILED] Timed out after 300.001s.
    Expected:
        <*v1.ResourceQuota | 0xc0035c3e00>:
            metadata:
              creationTimestamp: "2025-05-09T20:00:28Z"
              managedFields:
              - apiVersion: v1
                fieldsType: FieldsV1
                fieldsV1:
                  f:spec:
                ...
                manager: e2e.test
                operation: Update
                time: "2025-05-09T20:00:28Z"
              - apiVersion: v1
                fieldsType: FieldsV1
                fieldsV1:
                  f:status:
                    f:hard:
                      .: {}
                      f:configmaps: {}
                      f:count/replicasets.apps: {}
                      f:count/resourceclaims.resource.k8s.io: {}
                      f:cpu: {}
                      f:ephemeral-storage: {}
                      f:gold.deviceclass.resource.k8s.io/devices: {}
                      f:gold.storageclass.storage.k8s.io/persistentvolumeclaims: {}
                      f:gold.storageclass.storage.k8s.io/requests.storage: {}
                      f:memory: {}
                      f:persistentvolumeclaims: {}
                      f:pods: {}
                      f:replicationcontrollers: {}
                      f:requests.example.com/dongle: {}
                      f:requests.storage: {}
                      f:resourcequotas: {}
                      f:secrets: {}
                      f:services: {}
                      f:services.loadbalancers: {}
                      f:services.nodeports: {}
                    f:used:
                      .: {}
                      f:configmaps: {}
                      f:count/replicasets.apps: {}
                      f:count/resourceclaims.resource.k8s.io: {}
                      f:cpu: {}
                      f:ephemeral-storage: {}
                      f:gold.deviceclass.resource.k8s.io/devices: {}
                      f:gold.storageclass.storage.k8s.io/persistentvolumeclaims: {}
                      f:gold.storageclass.storage.k8s.io/requests.storage: {}
                      f:memory: {}
                      f:persistentvolumeclaims: {}
                      f:pods: {}
                      f:replicationcontrollers: {}
                      f:requests.example.com/dongle: {}
                      f:requests.storage: {}
                      f:resourcequotas: {}
                      f:secrets: {}
                      f:services: {}
                      f:services.loadbalancers: {}
                      f:services.nodeports: {}
                manager: kube-controller-manager
                operation: Update
                subresource: status
                time: "2025-05-09T20:00:28Z"
                ...
            status:
              hard:
                configmaps: "10"
                count/replicasets.apps: "5"
                count/resourceclaims.resource.k8s.io: "1"
                cpu: "1"
                ephemeral-storage: 50Gi
                gold.deviceclass.resource.k8s.io/devices: "1"
                gold.storageclass.storage.k8s.io/persistentvolumeclaims: "10"
                gold.storageclass.storage.k8s.io/requests.storage: 10Gi
                memory: 500Mi
                persistentvolumeclaims: "10"
                pods: "5"
                replicationcontrollers: "10"
                requests.example.com/dongle: "3"
                requests.storage: 10Gi
                resourcequotas: "1"
                secrets: "10"
                services: "10"
                services.loadbalancers: "1"
                services.nodeports: "1"
              used:
                configmaps: "1"
                count/replicasets.apps: "0"
                count/resourceclaims.resource.k8s.io: "0"
                cpu: "0"
                ephemeral-storage: "0"
                gold.deviceclass.resource.k8s.io/devices: "0"
                gold.storageclass.storage.k8s.io/persistentvolumeclaims: "0"
                gold.storageclass.storage.k8s.io/requests.storage: "0"
                memory: "0"
                persistentvolumeclaims: "0"
                pods: "0"
                replicationcontrollers: "0"
                requests.example.com/dongle: "0"
                requests.storage: "0"
                resourcequotas: "1"
                secrets: "0"
                services: "0"
                services.loadbalancers: "0"
                services.nodeports: "0"
    to have the following .status.used entries:
        count/resourceclaims.resource.k8s.io: "1"
        gold.deviceclass.resource.k8s.io/devices: "0"
        resourcequotas: "0"
    In [It] at: k8s.io/kubernetes/test/e2e/apimachinery/resource_quota.go:523 @ 05/09/25 20:05:28.325

This is more useful because the failure is predictable and includes the managed
fields. Those are important in this case because both kube-apiserver
and kube-controller-manager update the status. One of them is not doing its
job.
2025-05-16 08:15:35 +02:00
2025-05-09 10:25:25 +08:00
2025-05-09 10:25:25 +08:00
2025-05-15 21:19:18 -04:00
2025-05-15 21:19:11 -04:00
2025-05-15 21:19:11 -04:00
2025-05-15 21:19:11 -04:00
2025-05-15 21:19:11 -04:00
2025-05-15 21:19:11 -04:00
2025-02-26 11:27:07 +01:00
2025-05-15 21:19:11 -04:00
2025-05-13 15:46:43 -05:00
2024-12-23 00:15:17 +03:30

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.

Description
Production-Grade Container Scheduling and Management
Readme Apache-2.0 1.4 GiB
Languages
Go 97%
Shell 2.6%
PowerShell 0.2%