mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
Fix #15609
This commit is contained in:
parent
a5a917603c
commit
83c28c9cfd
@ -75,23 +75,13 @@ The system adds fields in several ways:
|
|||||||
- For example: `metadata.uid` is set synchronously. (Read more about [metadata](../devel/api-conventions.md#metadata)).
|
- For example: `metadata.uid` is set synchronously. (Read more about [metadata](../devel/api-conventions.md#metadata)).
|
||||||
- For example, `status.hostIP` is set only after the pod has been scheduled. This often happens fast, but you may notice pods which do not have this set yet. This is called Late Initialization. (Read mode about [status](../devel/api-conventions.md#spec-and-status) and [late initialization](../devel/api-conventions.md#late-initialization) ).
|
- For example, `status.hostIP` is set only after the pod has been scheduled. This often happens fast, but you may notice pods which do not have this set yet. This is called Late Initialization. (Read mode about [status](../devel/api-conventions.md#spec-and-status) and [late initialization](../devel/api-conventions.md#late-initialization) ).
|
||||||
- Some fields are set to default values. Some defaults vary by cluster and some are fixed for the API at a certain version. (Read more about [defaulting](../devel/api-conventions.md#defaulting)).
|
- Some fields are set to default values. Some defaults vary by cluster and some are fixed for the API at a certain version. (Read more about [defaulting](../devel/api-conventions.md#defaulting)).
|
||||||
- For example, `spec.containers.imagePullPolicy` always defaults to `IfNotPresent` in api v1.
|
- For example, `spec.containers[0].imagePullPolicy` always defaults to `IfNotPresent` in api v1.
|
||||||
- For example, `spec.containers.resources.limits.cpu` may be defaulted to `100m` on some clusters, to some other value on others, and not defaulted at all on others.
|
- For example, `spec.containers[0].resources.limits.cpu` may be defaulted to `100m` on some clusters, to some other value on others, and not defaulted at all on others.
|
||||||
The API will generally not modify fields that you have set; it just sets ones which were unspecified.
|
The API will generally not modify fields that you have set; it just sets ones which were unspecified.
|
||||||
|
|
||||||
## <a name="finding_schema_docs"></a>Finding Documentation on Resource Fields
|
## <a name="finding_schema_docs"></a>Finding Documentation on Resource Fields
|
||||||
|
|
||||||
You can browse auto-generated API documentation at the [project website](http://kubernetes.io/third_party/swagger-ui/) or directly from your cluster, like this:
|
You can browse auto-generated API documentation at the [project website](http://kubernetes.io/v1.0/api-ref.html) or on [github](../../docs/api-reference/).
|
||||||
- Run `kubectl proxy --api-prefix=/`
|
|
||||||
- Go to `http://localhost:8001/swagger-ui` in your browser.
|
|
||||||
- It should say "swagger" at the top-left.
|
|
||||||
|
|
||||||
Once there:
|
|
||||||
- Click on "v1" and wait for it to expand.
|
|
||||||
- Search for "pods", "services", "replicationcontrollers" or some other resource.
|
|
||||||
- Click on that POST row for the matching resource.
|
|
||||||
- Click on the words "Model".
|
|
||||||
- You should see a list of all possible resource fields, starting with `v1.pods {...}`
|
|
||||||
|
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
|
Loading…
Reference in New Issue
Block a user