Explicitly version Clientset in example (#6446)
Core() is deprecated in favor of CoreV1
This commit is contained in:
committed by
Steve Perry
parent
e316d532b2
commit
e1d8864d52
@@ -136,7 +136,7 @@ import (
|
|||||||
// creates the clientset
|
// creates the clientset
|
||||||
clientset, _:= kubernetes.NewForConfig(config)
|
clientset, _:= kubernetes.NewForConfig(config)
|
||||||
// access the API to list pods
|
// 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))
|
fmt.Printf("There are %d pods in the cluster\n", len(pods.Items))
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user