[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How to create container with Ubuntu Image on OpenShift



Hi Lorenz,

The pod restarting has nothing to do with the service. You could even access the pod without defining any service using "oc rsh" or "oc port-forward".

Check the pod logs using "oc logs <pod-name>" to see if there is an error message.

Probably you choose an image that was not intended to be run as is, but only to be a base image for other container images. If the image does not start a long-running process the container will stop right after starting successfully but OSE will keep restarting it, because OSE assumes all pods you create are long-running.


[]s, Fernando Lozano

How do I have to create a container with an Ubuntu Image on OpenShift?
I made a new project:
oc new-project ubuntu
oc new-app ubuntu (will do an implicit pull of the right image)
A service will not be generated for DeploymentConfig "ubuntu" because no exposed ports were detected. Use 'oc expose dc "ubuntu" --port=[port]' to create a service.
imagestreams/ubuntu
deploymentconfigs/ubuntu
Run 'oc status' to view your app.

So I did oc expose dc "ubuntu" --port=OpenTCPPort
Now I've service with a pod which is restarting the whole time:
Container image "library/ubuntu sha256:8b1bffa54d8a58395bae61ec32f1a70fc82a939e4a7179e6227eb79e4c3c56f6" already present on machine (40 times in the last 6 minutes, 30 seconds)

It keeps restarting the container. Are there some parameters you have to describe? I can't find information about it.


_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]