Is there a specification of what Kubernetes is the implementation of?

I was wondering: Is there a specification of what Kubernetes is the implementation of?

The API to low-level container runtimes is specified by the OCI. An implementation for this also comes from the OCI, runc. There are also other implementations that follow the specification. Another example is crun. This means that the API specifies what low-level container runtimes must be able to do. But the implementation is separate from the specification that runc follows.
The API to high-level container runtimes is specified with the CRI. For example, containerd and CRI-O implement this specification and therefore it is also given what the high-level container runtimes must be able to do if they want to follow the CRI specification. Again, the specification is developed separately from the implementation.

Is there also a “product-independent” specification for Kubernetes?
I found the OpenAPI spec, but that is part of the application and not a “product independent” specification. (kubernetes/api/openapi-spec at master · kubernetes/kubernetes · GitHub)
I also found the Conformance Tests, but this is not a formal document as it is a specification. (GitHub - cncf/k8s-conformance: 🧪CNCF K8s Conformance Working Group)

I didn’t find a “product independent” specification, which suggests that Kubernetes proclaims itself as an industry standard and equates its documentation to a specification.

To me, the difference between specification and implementation is the place of definition of the thing. If a thing defines itself it is not a specification. Then it is a way of solving a problem that is accepted by all. If there is a generic definition of the behaviour and different approaches to a solution can arise from it, it is a specification.

I hope someone can help me with my question.
With kind regards
Pascal Theml

For what reason are you looking for a specification? Are you planning to run model checkers against it? Given the very broad and evolving API surface in Kubernetes, I don’t think there has been any conscious efforts to define a formal specification for various K8s abstractions. There are design documents that capture the APIs and different approaches for implementation. These are part of Kubernetes Enhancement Proposals (KEPs). You can find the KEPs in this repo: enhancements/keps at master · kubernetes/enhancements · GitHub
You can look through that to understand the level of details that are usually captured when adding a new API/abstraction to K8s. In case you want to define formal specification in some kind of language (Z, VDM), you can start with one of the well-known abstractions (say, Deployment), go through its KEP and try to model the behavior outlined in the KEP.

I am currently writing my bachelor thesis. In researching containers, I found specifications and also implementations that follow these specifications. OCI → runc, CNI → Refernce Plugins, … but what about Kubernetes?
I am looking for a formal specification for Kubernetes.

Thanks for your link to the KEPs, I didn’t know them yet. But I don’t think that’s a formal specification. Do you have another approach to find a specification or can you explain to me if KEPs could serve as a specification after all.

Pretty much this. As far as I’m aware there is no agreed upon formal definition for what Kubernetes is like you have with it’s lower level components.

Kubernetes is the application that is subject to change. Similar to the Linux kernel.

I think you’ll find the general pattern is that early implementations in some area come first. Then, people start wanting standardization, so they form working groups to write specifications. To use one of your examples, Docker broke new ground, then people wanted standards for containers, and the Open Container Initiative formed.

Hopefully this makes some intuitive sense. It’s difficult to write standards for some new thing that is still in flux and is not yet widely understood (though it is attempted all the time!).

All that said, it seems worth mentioning the Kubernetes Resource Model as an example of adding some definition to just what it is that Kubernetes is implementing at its core.