mirror of https://github.com/k3s-io/k3s
Update basic example in client docs
parent
8d90427c34
commit
a95ec884c5
|
@ -24,8 +24,6 @@ Most consumers should use the Config object to create a Client:
|
|||
import (
|
||||
client "k8s.io/kubernetes/pkg/client/unversioned"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/fields"
|
||||
"k8s.io/kubernetes/pkg/labels"
|
||||
)
|
||||
|
||||
[...]
|
||||
|
@ -39,7 +37,7 @@ Most consumers should use the Config object to create a Client:
|
|||
if err != nil {
|
||||
// handle error
|
||||
}
|
||||
pods, err := client.Pods(api.NamespaceDefault).List(labels.Everything(), fields.Everything())
|
||||
pods, err := client.Pods(api.NamespaceDefault).List(api.ListOptions{})
|
||||
if err != nil {
|
||||
// handle error
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue