mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 10:19:50 +00:00
updated document
as far as I dug into codes I figured it out that the config exists in `restclient` package
This commit is contained in:
parent
a74ec3f90a
commit
fb00d77c17
@ -23,12 +23,13 @@ Most consumers should use the Config object to create a Client:
|
||||
|
||||
import (
|
||||
client "k8s.io/kubernetes/pkg/client/unversioned"
|
||||
"k8s.io/kubernetes/pkg/client/restclient"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
)
|
||||
|
||||
[...]
|
||||
|
||||
config := &client.Config{
|
||||
config := &restclient.Config{
|
||||
Host: "http://localhost:8080",
|
||||
Username: "test",
|
||||
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:
|
||||
|
||||
config := &client.Config{
|
||||
config := &restclient.Config{
|
||||
Host: "https://localhost:8080",
|
||||
Transport: oauthclient.Transport(),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user