Skip to content

Commit 6f6b57c

Browse files
author
AmarNathChary
committed
updated example appearance in k8s api concept
Updated examples appearance in k8s api concep updated examples appearance in k8s API concept Updated examples appearance in k8s API concept
1 parent 17ed43e commit 6f6b57c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

content/en/docs/reference/using-api/api-concepts.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ For example:
148148

149149
1. List all of the pods in a given namespace.
150150

151-
```console
151+
```
152152
GET /api/v1/namespaces/test/pods
153153
---
154154
200 OK
@@ -204,7 +204,7 @@ to a given `resourceVersion` the client is requesting have already been sent. Th
204204
document representing the `BOOKMARK` event is of the type requested by the request,
205205
but only includes a `.metadata.resourceVersion` field. For example:
206206

207-
```console
207+
```
208208
GET /api/v1/namespaces/test/pods?watch=1&resourceVersion=10245&allowWatchBookmarks=true
209209
---
210210
200 OK
@@ -262,7 +262,7 @@ is 10245 and there are two pods: `foo` and `bar`. Then sending the following req
262262
_consistent read_ by setting empty resource version using `resourceVersion=`) could result
263263
in the following sequence of events:
264264

265-
```console
265+
```
266266
GET /api/v1/namespaces/test/pods?watch=1&sendInitialEvents=true&allowWatchBookmarks=true&resourceVersion=&resourceVersionMatch=NotOlderThan
267267
---
268268
200 OK
@@ -303,7 +303,7 @@ can be saved and the latency can be reduced.
303303
To verify if `APIResponseCompression` is working, you can send a **get** or **list** request to the
304304
API server with an `Accept-Encoding` header, and check the response size and headers. For example:
305305

306-
```console
306+
```
307307
GET /api/v1/pods
308308
Accept-Encoding: gzip
309309
---
@@ -356,7 +356,7 @@ of 500 pods at a time, request those chunks as follows:
356356

357357
1. List all of the pods on a cluster, retrieving up to 500 pods each time.
358358

359-
```console
359+
```
360360
GET /api/v1/pods?limit=500
361361
---
362362
200 OK
@@ -377,7 +377,7 @@ of 500 pods at a time, request those chunks as follows:
377377

378378
2. Continue the previous call, retrieving the next set of 500 pods.
379379

380-
```console
380+
```
381381
GET /api/v1/pods?limit=500&continue=ENCODED_CONTINUE_TOKEN
382382
---
383383
200 OK
@@ -398,7 +398,7 @@ of 500 pods at a time, request those chunks as follows:
398398

399399
3. Continue the previous call, retrieving the last 253 pods.
400400

401-
```console
401+
```
402402
GET /api/v1/pods?limit=500&continue=ENCODED_CONTINUE_TOKEN_2
403403
---
404404
200 OK
@@ -542,7 +542,7 @@ type.
542542

543543
For example, list all of the pods on a cluster in the Table format.
544544

545-
```console
545+
```
546546
GET /api/v1/pods
547547
Accept: application/json;as=Table;g=meta.k8s.io;v=v1
548548
---
@@ -563,7 +563,7 @@ For API resource types that do not have a custom Table definition known to the c
563563
plane, the API server returns a default Table response that consists of the resource's
564564
`name` and `creationTimestamp` fields.
565565
566-
```console
566+
```
567567
GET /apis/crd.example.com/v1alpha1/namespaces/default/resources
568568
---
569569
200 OK
@@ -598,7 +598,7 @@ uses the Table information and must work against all resource types, including
598598
extensions, you should make requests that specify multiple content types in the
599599
`Accept` header. For example:
600600
601-
```console
601+
```
602602
Accept: application/json;as=Table;g=meta.k8s.io;v=v1, application/json
603603
```
604604
@@ -626,7 +626,7 @@ For example:
626626
627627
1. List all of the pods on a cluster in Protobuf format.
628628
629-
```console
629+
```
630630
GET /api/v1/pods
631631
Accept: application/vnd.kubernetes.protobuf
632632
---
@@ -639,7 +639,7 @@ For example:
639639
1. Create a pod by sending Protobuf encoded data to the server, but request a response
640640
in JSON.
641641
642-
```console
642+
```
643643
POST /api/v1/namespaces/test/pods
644644
Content-Type: application/vnd.kubernetes.protobuf
645645
Accept: application/json
@@ -664,7 +664,7 @@ As a client, if you might need to work with extension types you should specify m
664664
content types in the request `Accept` header to support fallback to JSON.
665665
For example:
666666
667-
```console
667+
```
668668
Accept: application/vnd.kubernetes.protobuf, application/json
669669
```
670670
@@ -677,7 +677,7 @@ describes the encoding and type of the underlying object and then contains the o
677677
678678
The wrapper format is:
679679
680-
```console
680+
```
681681
A four byte magic number prefix:
682682
Bytes 0-3: "k8s\x00" [0x6b, 0x38, 0x73, 0x00]
683683

@@ -895,7 +895,7 @@ effects on any request marked as dry runs.
895895

896896
Here is an example dry-run request that uses `?dryRun=All`:
897897

898-
```console
898+
```
899899
POST /api/v1/namespaces/test/pods?dryRun=All
900900
Content-Type: application/json
901901
Accept: application/json

0 commit comments

Comments
 (0)