Bug 1879051

Summary: oc new project suggest to create a deployment that doesn't work
Product: OpenShift Container Platform Reporter: Eduardo Minguez <eminguez>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED DUPLICATE QA Contact: zhou ying <yinzhou>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.5CC: aos-bugs, jokerman, mfojtik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-15 11:21:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eduardo Minguez 2020-09-15 10:42:21 UTC
Description of problem:
When creating a project with `oc new-project` the output suggest to deploy a basic ruby application or a simple kubernetes application:

```
Now using project "xxx" on server "https://whatever.example.com:6443".

You can add applications to this project with the 'new-app' command. For example, try:

    oc new-app ruby~https://github.com/sclorg/ruby-ex.git

to build a new example application in Ruby. Or use kubectl to deploy a simple Kubernetes application:

    kubectl create deployment hello-node --image=gcr.io/hello-minikube-zero-install/hello-node

```

The former doesn't work:

```
$ oc create deployment hello-node --image=gcr.io/hello-minikube-zero-install/hello-node
deployment.apps/hello-node created

$ oc get pods
NAME                          READY   STATUS             RESTARTS   AGE
hello-node-677b9cfc6b-xzc6c   0/1     ImagePullBackOff   0          19s

$ oc logs hello-node-677b9cfc6b-xzc6c
Error from server (BadRequest): container "hello-node" in pod "hello-node-677b9cfc6b-xzc6c" is waiting to start: trying and failing to pull image

$ oc get events
LAST SEEN   TYPE      REASON              OBJECT                             MESSAGE
25s         Normal    Scheduled           pod/hello-node-677b9cfc6b-xzc6c    Successfully assigned test-service-nodeport-quota/hello-node-677b9cfc6b-xzc6c to kni1-worker-0.example.com
23s         Normal    AddedInterface      pod/hello-node-677b9cfc6b-xzc6c    Add eth0 [10.131.0.26/23]
7s          Normal    Pulling             pod/hello-node-677b9cfc6b-xzc6c    Pulling image "gcr.io/hello-minikube-zero-install/hello-node"
6s          Warning   Failed              pod/hello-node-677b9cfc6b-xzc6c    Failed to pull image "gcr.io/hello-minikube-zero-install/hello-node": rpc error: code = Unknown desc = Requesting bear token: invalid status code from registry 400 (Bad Request)
6s          Warning   Failed              pod/hello-node-677b9cfc6b-xzc6c    Error: ErrImagePull
21s         Normal    BackOff             pod/hello-node-677b9cfc6b-xzc6c    Back-off pulling image "gcr.io/hello-minikube-zero-install/hello-node"
21s         Warning   Failed              pod/hello-node-677b9cfc6b-xzc6c    Error: ImagePullBackOff
25s         Normal    SuccessfulCreate    replicaset/hello-node-677b9cfc6b   Created pod: hello-node-677b9cfc6b-xzc6c
25s         Normal    ScalingReplicaSet   deployment/hello-node              Scaled up replica set hello-node-677b9cfc6b to 1
```

Version-Release number of selected component (if applicable):
$ oc version
Client Version: 4.5.9
Server Version: 4.5.9
Kubernetes Version: v1.18.3+6c42de8

How reproducible:
Create a new project and try to deploy the example.

Steps to Reproduce:
1. Have a proper cluster running
2. oc new-project whatever
3. oc create deployment hello-node --image=gcr.io/hello-minikube-zero-install/hello-node

Actual results:
The example app doesn't work (and uses an upstream repo)

Expected results:
The example app works and it is hosted in the Red Hat registry (or quay.io)

Additional info:

Comment 1 Maciej Szulik 2020-09-15 11:21:21 UTC

*** This bug has been marked as a duplicate of bug 1873275 ***