commit
6bc8f405ac
|
@ -201,8 +201,11 @@ For example: `partition in (customerA, customerB),environment!=qa`.
|
|||
|
||||
### LIST and WATCH filtering
|
||||
|
||||
LIST and WATCH operations may specify label selectors to filter the sets of objects
|
||||
returned using a query parameter. Both requirements are permitted
|
||||
For **list** and **watch** operations, you can specify label selectors to filter the sets of objects
|
||||
returned; you specify the filter using a query parameter.
|
||||
(To learn in detail about watches in Kubernetes, read
|
||||
[efficient detection of changes](/docs/reference/using-api/api-concepts/#efficient-detection-of-changes)).
|
||||
Both requirements are permitted
|
||||
(presented here as they would appear in a URL query string):
|
||||
|
||||
* _equality-based_ requirements: `?labelSelector=environment%3Dproduction,tier%3Dfrontend`
|
||||
|
|
|
@ -813,9 +813,9 @@ apply multiple fixes in between pausing and resuming without triggering unnecess
|
|||
```
|
||||
deployment.apps/nginx-deployment resumed
|
||||
```
|
||||
* Watch the status of the rollout until it's done.
|
||||
* {{< glossary_tooltip text="Watch" term_id="watch" >}} the status of the rollout until it's done.
|
||||
```shell
|
||||
kubectl get rs -w
|
||||
kubectl get rs --watch
|
||||
```
|
||||
|
||||
The output is similar to this:
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
title: Watch
|
||||
id: watch
|
||||
date: 2024-07-02
|
||||
full_link: /docs/reference/using-api/api-concepts/#api-verbs
|
||||
short_description: >
|
||||
A verb that is used to track changes to an object in Kubernetes as a stream.
|
||||
|
||||
aka:
|
||||
tags:
|
||||
- API verb
|
||||
- fundamental
|
||||
---
|
||||
A verb that is used to track changes to an object in Kubernetes as a stream.
|
||||
It is used for the efficient detection of changes.
|
||||
|
||||
<!--more-->
|
||||
|
||||
A verb that is used to track changes to an object in Kubernetes as a stream. Watches allow
|
||||
efficient detection of changes; for example, a
|
||||
{{< glossary_tooltip term_id="controller" text="controller">}} that needs to know whenever a
|
||||
ConfigMap has changed can use a watch rather than polling.
|
||||
|
||||
See [Efficient Detection of Changes in API Concepts](/docs/reference/using-api/api-concepts/#efficient-detection-of-changes) for more information.
|
|
@ -19,7 +19,9 @@ fine grained authorization (such as separate views for Pod details and
|
|||
log retrievals), and can accept and serve those resources in different
|
||||
representations for convenience or efficiency.
|
||||
|
||||
Kubernetes supports efficient change notifications on resources via *watches*.
|
||||
Kubernetes supports efficient change notifications on resources via
|
||||
_watches_:
|
||||
{{< glossary_definition prepend="in the Kubernetes API, watch is" term_id="watch" length="short" >}}
|
||||
Kubernetes also provides consistent list operations so that API clients can
|
||||
effectively cache, track, and synchronize the state of resources.
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ hello */1 * * * * False 0 <none> 10s
|
|||
```
|
||||
|
||||
As you can see from the results of the command, the cron job has not scheduled or run any jobs yet.
|
||||
Watch for the job to be created in around one minute:
|
||||
{{< glossary_tooltip text="Watch" term_id="watch" >}} for the job to be created in around one minute:
|
||||
|
||||
```shell
|
||||
kubectl get jobs --watch
|
||||
|
|
|
@ -77,7 +77,7 @@ It creates a [headless Service](/docs/concepts/services-networking/service/#head
|
|||
{{% code_sample file="application/web/web.yaml" %}}
|
||||
|
||||
You will need to use at least two terminal windows. In the first terminal, use
|
||||
[`kubectl get`](/docs/reference/generated/kubectl/kubectl-commands/#get) to watch the creation
|
||||
[`kubectl get`](/docs/reference/generated/kubectl/kubectl-commands/#get) to {{< glossary_tooltip text="watch" term_id="watch" >}} the creation
|
||||
of the StatefulSet's Pods.
|
||||
|
||||
```shell
|
||||
|
|
Loading…
Reference in New Issue