Explicitly version Clientset in example (#6446)
Core() is deprecated in favor of CoreV1reviewable/pr6406/r3^2
parent
e316d532b2
commit
e1d8864d52
|
@ -136,7 +136,7 @@ import (
|
|||
// creates the clientset
|
||||
clientset, _:= kubernetes.NewForConfig(config)
|
||||
// access the API to list pods
|
||||
pods, _:= clientset.Core().Pods("").List(v1.ListOptions{})
|
||||
pods, _:= clientset.CoreV1().Pods("").List(v1.ListOptions{})
|
||||
fmt.Printf("There are %d pods in the cluster\n", len(pods.Items))
|
||||
...
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue