mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Merge pull request #31688 from mehdy/master
Automatic merge from submit-queue updated client document
This commit is contained in:
commit
7c27a2686f
@ -23,12 +23,13 @@ Most consumers should use the Config object to create a Client:
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
client "k8s.io/kubernetes/pkg/client/unversioned"
|
client "k8s.io/kubernetes/pkg/client/unversioned"
|
||||||
|
"k8s.io/kubernetes/pkg/client/restclient"
|
||||||
"k8s.io/kubernetes/pkg/api"
|
"k8s.io/kubernetes/pkg/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
[...]
|
[...]
|
||||||
|
|
||||||
config := &client.Config{
|
config := &restclient.Config{
|
||||||
Host: "http://localhost:8080",
|
Host: "http://localhost:8080",
|
||||||
Username: "test",
|
Username: "test",
|
||||||
Password: "password",
|
Password: "password",
|
||||||
@ -44,7 +45,7 @@ Most consumers should use the Config object to create a Client:
|
|||||||
|
|
||||||
More advanced consumers may wish to provide their own transport via a http.RoundTripper:
|
More advanced consumers may wish to provide their own transport via a http.RoundTripper:
|
||||||
|
|
||||||
config := &client.Config{
|
config := &restclient.Config{
|
||||||
Host: "https://localhost:8080",
|
Host: "https://localhost:8080",
|
||||||
Transport: oauthclient.Transport(),
|
Transport: oauthclient.Transport(),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user