Bug 1879051 - oc new project suggest to create a deployment that doesn't work
Summary: oc new project suggest to create a deployment that doesn't work
Keywords:
Status: CLOSED DUPLICATE of bug 1873275
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-15 10:42 UTC by Eduardo Minguez
Modified: 2020-09-15 11:21 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-15 11:21:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.