@@ -16,6 +16,8 @@ Download packages from [latest release](https://github.com/3scale/3scale_toolbox
1616* [ Mac OS X] ( #mac-os-x )
1717* [ Windows] ( #windows )
1818* [ Docker] ( #docker )
19+ * [ Kubernetes] ( #kubernetes )
20+
1921
2022### Centos Fedora
2123
@@ -101,7 +103,104 @@ quay.io/redhat/3scale-toolbox
1011031 . Test executing ` help ` command
102104
103105``` bash
104- docker run --rm quay.io/redhat/3scale-toolbox:VERSION 3scale help
106+ docker run --rm quay.io/redhat/3scale-toolbox 3scale help
107+ ```
108+
109+ ### Kubernetes
110+
111+ Also working with Openshift.
112+
113+ 1 . Provision the * 3scale-toolbox* secret with your 3scale credentials
114+
115+ ``` bash
116+ 3scale remote add 3scale-instance " https://123...456@MY-TENANT-admin.3scale.net/"
117+ kubectl create secret generic 3scale-toolbox --from-file=" $HOME /.3scalerc.yaml"
118+ ```
119+
120+ 2 . Deploy Job template to run your 3scale command.
121+ In the example shown below, ` 3scale remote list ` command will be run.
122+
123+ Write the following yaml template content in a file called ` toolbox-job.yaml ` .
124+
125+ ``` yaml
126+ apiVersion : batch/v1
127+ kind : Job
128+ metadata :
129+ name : toolbox
130+ spec :
131+ backoffLimit : 4
132+ activeDeadlineSeconds : 300
133+ template :
134+ spec :
135+ restartPolicy : Never
136+ containers :
137+ - name : toolbox-job
138+ image : quay.io/redhat/3scale-toolbox
139+ env :
140+ - name : HOME
141+ value : /var/lib/toolbox
142+ args :
143+ - 3scale
144+ - remote
145+ - list
146+ volumeMounts :
147+ - name : toolbox-config
148+ mountPath : /var/lib/toolbox
149+ volumes :
150+ - name : toolbox-config
151+ secret :
152+ secretName : 3scale-toolbox
153+ ` ` `
154+
155+ Deploy the job
156+
157+ ` ` ` bash
158+ kubectl create -f toolbox-job.yaml
159+ ```
160+
161+ Check on the status of the Job
162+
163+ ``` bash
164+ $ kubectl describe jobs/toolbox
165+
166+ Name: toolbox
167+ Namespace: test
168+ Selector: controller-uid=057ec3ff-fa45-11e9-b43e-065562ed0850
169+ Labels: controller-uid=057ec3ff-fa45-11e9-b43e-065562ed0850
170+ job-name=toolbox
171+ Annotations: < none>
172+ Parallelism: 1
173+ Completions: 1
174+ Start Time: Tue, 29 Oct 2019 13:09:56 +0100
175+ Completed At: Tue, 29 Oct 2019 13:10:13 +0100
176+ Duration: 17s
177+ Active Deadline Seconds: 300s
178+ Pods Statuses: 0 Running / 1 Succeeded / 0 Failed
179+ Pod Template:
180+ Labels: controller-uid=057ec3ff-fa45-11e9-b43e-065562ed0850
181+ job-name=toolbox
182+ Containers:
183+ toolbox-job:
184+ Image: quay.io/redhat/3scale-toolbox
185+ Port: < none>
186+ Host Port: < none>
187+ Args:
188+ 3scale
189+ remote
190+ list
191+ Environment:
192+ HOME: /var/lib/toolbox
193+ Mounts:
194+ /var/lib/toolbox from toolbox-config (rw)
195+ Volumes:
196+ toolbox-config:
197+ Type: Secret (a volume populated by a Secret)
198+ SecretName: 3scale-toolbox
199+ Optional: false
200+ Events:
201+ Type Reason Age From Message
202+ ---- ------ ---- ---- -------
203+ Normal SuccessfulCreate 24s job-controller Created pod: toolbox-94xsg
105204```
106205
107206### Troubleshooting
0 commit comments