You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -245,16 +242,16 @@ The output is similar to this:
245
242
```
246
243
247
244
<!--
248
-
The above examples use the `--insecure` flag. This leaves it subject to MITM
249
-
attacks. When kubectl accesses the cluster it uses a stored root certificate
250
-
and client certificates to access the server. (These are installed in the
251
-
`~/.kube` directory). Since cluster certificates are typically self-signed, it
245
+
The above examples use the `--insecure` flag. This leaves it subject to MITM
246
+
attacks. When kubectl accesses the cluster it uses a stored root certificate
247
+
and client certificates to access the server. (These are installed in the
248
+
`~/.kube` directory). Since cluster certificates are typically self-signed, it
252
249
may take special configuration to get your http client to use root
253
250
certificate.
254
251
255
252
On some clusters, the apiserver does not require authentication; it may serve
256
-
on localhost, or be protected by a firewall. There is not a standard
257
-
for this. [Controlling Access to the API](/docs/concepts/security/controlling-access)
253
+
on localhost, or be protected by a firewall. There is not a standard
254
+
for this. [Controlling Access to the API](/docs/concepts/security/controlling-access)
258
255
describes how a cluster admin can configure this.
259
256
-->
260
257
上面的例子使用了 `--insecure` 参数,这使得它很容易受到 MITM 攻击。
@@ -275,11 +272,18 @@ client libraries.
275
272
276
273
### Go client
277
274
278
-
* To get the library, run the following command: `go get k8s.io/client-go@kubernetes-<kubernetes-version-number>`, see [INSTALL.md](https://github.com/kubernetes/client-go/blob/master/INSTALL.md#for-the-casual-user) for detailed installation instructions. See [https://github.com/kubernetes/client-go](https://github.com/kubernetes/client-go#compatibility-matrix) to see which versions are supported.
279
-
* Write an application atop of the client-go clients. Note that client-go defines its own API objects, so if needed, please import API definitions from client-go rather than from the main repository, e.g., `import "k8s.io/client-go/kubernetes"` is correct.
275
+
* To get the library, run the following command: `go get k8s.io/client-go@kubernetes-<kubernetes-version-number>`,
276
+
see [INSTALL.md](https://github.com/kubernetes/client-go/blob/master/INSTALL.md#for-the-casual-user)
* Write an application atop of the client-go clients. Note that client-go defines its own API objects,
281
+
so if needed, please import API definitions from client-go rather than from the main repository,
282
+
e.g., `import "k8s.io/client-go/kubernetes"` is correct.
280
283
281
284
The Go client can use the same [kubeconfig file](/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
282
-
as the kubectl CLI does to locate and authenticate to the apiserver. See this [example](https://git.k8s.io/client-go/examples/out-of-cluster-client-configuration/main.go).
285
+
as the kubectl CLI does to locate and authenticate to the apiserver. See this
If the application is deployed as a Pod in the cluster, please refer to the [next section](#accessing-the-api-from-a-pod).
285
289
-->
@@ -307,10 +311,13 @@ Go 客户端可以像 kubectl CLI 一样使用相同的
307
311
<!--
308
312
### Python client
309
313
310
-
To use [Python client](https://github.com/kubernetes-client/python), run the following command: `pip install kubernetes`. See [Python Client Library page](https://github.com/kubernetes-client/python) for more installation options.
314
+
To use [Python client](https://github.com/kubernetes-client/python), run the following command:
315
+
`pip install kubernetes`. See [Python Client Library page](https://github.com/kubernetes-client/python)
316
+
for more installation options.
311
317
312
318
The Python client can use the same [kubeconfig file](/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
313
-
as the kubectl CLI does to locate and authenticate to the apiserver. See this [example](https://github.com/kubernetes-client/python/tree/master/examples).
319
+
as the kubectl CLI does to locate and authenticate to the apiserver. See this
0 commit comments