File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,21 @@ private static async Task Main(string[] args)
12
12
var config = KubernetesClientConfiguration . BuildConfigFromConfigFile ( ) ;
13
13
var client = new Kubernetes ( config ) ;
14
14
15
- ClientSet clientSet = new ClientSet ( client ) ;
15
+ var clientSet = new ClientSet ( client ) ;
16
16
var list = await clientSet . CoreV1 . Pod . ListAsync ( "default" ) . ConfigureAwait ( false ) ;
17
17
foreach ( var item in list )
18
18
{
19
19
System . Console . WriteLine ( item . Metadata . Name ) ;
20
20
}
21
21
22
- var pod = await clientSet . CoreV1 . Pod . GetAsync ( "test" , "default" ) . ConfigureAwait ( false ) ;
22
+ var pod = await clientSet . CoreV1 . Pod . GetAsync ( "test" , "default" ) . ConfigureAwait ( false ) ;
23
23
System . Console . WriteLine ( pod ? . Metadata ? . Name ) ;
24
+
25
+ var watch = clientSet . CoreV1 . Pod . WatchListAsync ( "default" ) ;
26
+ await foreach ( var ( _, item ) in watch . ConfigureAwait ( false ) )
27
+ {
28
+ System . Console . WriteLine ( item . Metadata . Name ) ;
29
+ }
24
30
}
25
31
}
26
32
}
You can’t perform that action at this time.
0 commit comments