OpenShift Simple Pod Running inside an OpenShift Project
Jump to navigation
Jump to search
Internal
Overview
This is the procedure to deploy a simple pod that starts executing inside an OpenShift project and permits arbitrary process execution inside it. This could prove useful while troubleshooting network issues which need running network utilities and tests from "inside the project". The pod will be started as soon as it is declared. Since there is no replication controller, the pod will be terminated and it will disappear when it is deleted.
Procedure
Use the following template: https://github.com/NovaOrdis/playground/blob/master/openshift/templates/standalone-pod-template.yaml
oc process -f https://raw.githubusercontent.com/NovaOrdis/playground/master/openshift/templates/standalone-pod-template.yaml | oc create -f -
Alternatively it can be created from the following content:
apiVersion: v1 kind: Pod metadata: name: standalone-pod spec: containers: - name: oc image: docker.io/openshiftdemos/oc command: ["/bin/bash", "-c", "sleep 1000000"] resources: limits: memory: 128Mi
The command is optional, if missing, the image's command will be executed.
then:
oc rsh standalone-pod
When you don't need it anymore:
oc delete standalone-pod