Creating a new application on OpenShift 3 errors with invalid DeploymentConifg and invalid DNS subdomain
Issue
-
"DeploymentConfig ... is invalid" error when creating a new application from a docker image
-
Error running the following:
oc new-app --insecure-registry=true --docker-image=registry.example.com:5000/rhel-httpd_example
Error: DeploymentConfig "rhel-httpd_example" is invalid: [metadata.name: invalid value 'rhel-httpd_example': must be a DNS subdomain (at most 253 characters, matching regex [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*): e.g. "example.com", triggers[1].imageChangeParams.from.name: invalid value 'centos-httpd-appd-building_services': name must be a valid subdomain, template.controllerTemplate.template.spec.containers[0].name: invalid value 'rhel-httpd_example': must be a DNS label (at most 63 characters, matching regex [a-z0-9]([-a-z0-9]*[a-z0-9])?): e.g. "my-name"] services/rhel-httpd_example
Environment
Red Hat OpenShift
-3
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.