what is app in oc new-app
oc new-app --docker-image vs oc create deployment image
The main difference between using "oc new-app" and "oc create deployment" is the number of resources created.
"oc create deployment" creates a "DeploymentConfiguration" resource, getting the image from the registry (quay.io in this case) and deploying as needed (i.e. one replica by default).
"oc new-app" creates a bunch of resources. In this case, as you are providing an image, it creates the "DeploymentConfiguration", the "ImageStream" and the "Service" needed to develop and manage the application itself (note the associated route is not created by default).
Other "oc new-app" variants may create more resources (i.e. if the source code is provided, "BuildConfig" resources are created).
So, responding to your question, using "oc new-app" is more common and useful for creating a new application from source code or images. Use "oc create deployment" if you need to update an existing application with new deployments, or need fine-grained control on your application resources.
http://www.mastertheboss.com/soa-cloud/openshift/openshift-cheatsheet

Comments
Post a Comment