File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 22
33Ruby client for the [ kubernetes] ( http://kubernetes.io/ ) API.
44
5+ ## Usage
6+ ``` ruby
7+ require ' kubernetes'
8+ require ' pp'
9+
10+ kube_config = Kubernetes ::KubeConfig .new (" #{ ENV [' HOME' ]} /.kube/config" )
11+ config = Kubernetes ::Configuration .new ()
12+
13+ kube_config.configure(config)
14+
15+ client = Kubernetes ::CoreV1Api .new (Kubernetes ::ApiClient .new (config))
16+
17+ pp client.list_namespaced_pod(' default' )
18+ ```
19+
520## Contribute
621
722Please see [ CONTRIBUTING.md] ( CONTRIBUTING.md ) for instructions on how to contribute.
Original file line number Diff line number Diff line change 1+ require 'kubernetes'
2+ require 'pp'
3+
4+ kube_config = Kubernetes ::KubeConfig . new ( "#{ ENV [ 'HOME' ] } /.kube/config" )
5+ config = Kubernetes ::Configuration . new ( )
6+
7+ kube_config . configure ( config )
8+
9+ client = Kubernetes ::CoreV1Api . new ( Kubernetes ::ApiClient . new ( config ) )
10+
11+ pp client . list_namespaced_pod ( 'default' )
12+
You can’t perform that action at this time.
0 commit comments