<p>I deployed my application on Openshift using the commands:</p>

<pre><code>oc project &lt;projectname&gt;
</code></pre>

<p>Then I navigate to my application's directory and use the command:</p>

<pre><code>mvn fabric8:deploy -Popenshift
</code></pre>

<p>This deploys to Openshift perfectly.</p>

<p>The only problem is that it automatically names my application and I am not sure where it is getting the name from. I want to change it to [app-name]-test, [app-name]-dev, etc</p>

<p>So, where does it get the application name from and how can I change it?</p>

<p>It's usually in your fabric8 <a href="https://maven.fabric8.io/#xml-configuration" rel="nofollow noreferrer">XML</a> configuration (<code>pom.xml</code>). For example:</p>

<pre><code>&lt;configuration&gt;
  &lt;!-- Standard d-m-p configuration which defines how images are build, i.e. how the docker.tar is created --&gt;
  &lt;images&gt;
    &lt;image&gt;
      &lt;name&gt;${image.user}/${project.artifactId}:${project.version}&lt;/name&gt;
      &lt;!-- "alias" is used to correlate to the containers in the pod spec --&gt;
      &lt;alias&gt;camel-service&lt;/alias&gt;
      &lt;build&gt;
        &lt;from&gt;fabric8/java&lt;/from&gt;
        &lt;assembly&gt;
          &lt;basedir&gt;/deployments&lt;/basedir&gt;
          &lt;descriptorRef&gt;artifact-with-dependencies&lt;/descriptorRef&gt;
        &lt;/assembly&gt;
        &lt;env&gt;
          &lt;JAVA_LIB_DIR&gt;/deployments&lt;/JAVA_LIB_DIR&gt;
          &lt;JAVA_MAIN_CLASS&gt;org.apache.camel.cdi.Main&lt;/JAVA_MAIN_CLASS&gt;
        &lt;/env&gt;
      &lt;/build&gt;
    &lt;/image&gt;
  &lt;/images&gt;
  &lt;!-- resources to be created --&gt;
  &lt;resources&gt;
    &lt;!-- Labels that are applied to all created objects --&gt;
    &lt;labels&gt;
      &lt;group&gt;quickstarts&lt;/group&gt;
    &lt;/labels&gt;
    &lt;!-- Definition of the ReplicationController / ReplicaSet. Any better name than "containers" ? --&gt;
    &lt;deployment&gt;
      &lt;!-- Name of the replication controller, which will have a sane default (container alisa, mvn coords, ..) --&gt;
      &lt;!-- Override here --&gt;
      &lt;name&gt;${project.artifactId}&lt;/name&gt;
      ...
</code></pre>

<p>It defaults to <code>${project.artifactId}</code> but you can override with whatever you'd like with something like <code>${project.artifactId}-dev</code>. You can also edit the deployment manually in Kubernetes:</p>

<pre><code>$ kubectl edit deployment ${project.artifactId}
</code></pre>
