what is app in oc new-app

Re: oc new-app --docker-image vs oc create deployment image

Hi TheHero

I completely agree, that sentence may be misleading.

Just adding one note: the term "application" in OpenShift (and in Kubernetes in general) is somehow overloaded.

When talking about resources, an "application" is just a bunch of resources with the same value for the "app" label. In other contexts, "application" refers to the set of program components deployed with a common purpose. 

But, again, I agree with you that the sentence can be improved.

KR

 




 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

Popular posts from this blog

Read and Navigate XML - Beautiful Soup

difference-between-stream-processing-and-message-processing

WordNet in Python