# Pull image from nexus 3 get error "http: server gave HTTP response to HTTPS cleint"

**URL:** <https://discuss.kubernetes.io/t/pull-image-from-nexus-3-get-error-http-server-gave-http-response-to-https-cleint/12655>\
**Category:** General Discussions\
**Created:** [August 31, 2020, 3:47pm UTC](https://discuss.kubernetes.io/t/pull-image-from-nexus-3-get-error-http-server-gave-http-response-to-https-cleint/12655 "2020-08-31T15:47:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lywwing](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@lywwing](https://discuss.kubernetes.io/u/lywwing)\
**Post date:** [August 31, 2020, 3:47pm UTC](https://discuss.kubernetes.io/t/pull-image-from-nexus-3-get-error-http-server-gave-http-response-to-https-cleint/12655/1 "2020-08-31T15:47:14Z")

</div>

Hi Guy,

I am new to kubernetes, I installed nexus 3 and create docker (hosted), docker push nginx to it. And try below:  
kubectl run test --image 10.12.161.146:5000/nginx:1.0.0  
Then get error:  
Failed to pull image “10.12.161.146:5000/nginx:1.0.0”: rpc error: code = Unknown desc = Get [https://10.12.161.146:5000/v1/\_ping:](https://10.12.161.146:5000/v1/_ping:) http: server gave HTTP response to HTTPS client  
Does kubernetes support this?

Regards  
Thanks…KEN

Asking for help? Comment out what you need so we can get more information to help you!

### Cluster information:

Kubernetes version:  
Client Version: version.Info{Major:“1”, Minor:“11+”, GitVersion:“v1.11.0+d4cacc0”, GitCommit:“d4cacc0”, GitTreeState:“clean”, BuildDate:“2018-10-15T09:45:30Z”, GoVersion:“go1.10.2”, Compiler:“gc”, Platform:“linux/amd64”}  
Server Version: version.Info{Major:“1”, Minor:“11+”, GitVersion:“v1.11.0+d4cacc0”, GitCommit:“d4cacc0”, GitTreeState:“clean”, BuildDate:“2019-06-14T11:34:18Z”, GoVersion:“go1.10.8”, Compiler:“gc”, Platform:“linux/amd64”}  
Cloud being used: (put bare-metal if not on a public cloud)  
Installation method: ansible-playbook  
Host OS: CentOS 7  
CNI and version:  
CRI and version:

You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.

---

<div class="post-metadata">

**Author:** ![tej-singh-rana](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/tej-singh-rana/32/5921_2.png) [@tej-singh-rana](https://discuss.kubernetes.io/u/tej-singh-rana)\
**Post date:** [September 1, 2020, 11:07am UTC](https://discuss.kubernetes.io/t/pull-image-from-nexus-3-get-error-http-server-gave-http-response-to-https-cleint/12655/2 "2020-09-01T11:07:24Z")

</div>

You have to create a secret and in the secret docker-registry type.  
You can visit this [link](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) for more details.

---

<div class="post-metadata">

**Author:** ![lywwing](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@lywwing](https://discuss.kubernetes.io/u/lywwing)\
**Post date:** [September 1, 2020, 3:04pm UTC](https://discuss.kubernetes.io/t/pull-image-from-nexus-3-get-error-http-server-gave-http-response-to-https-cleint/12655/3 "2020-09-01T15:04:26Z")

</div>

Hi tej-singh-rana,  
Thanks for help. I create yaml file below.  
apiVersion: apps/v1  
kind: Deployment  
metadata:  
name: nginx-deployment  
labels:  
app: nginx  
spec:  
replicas: 1  
selector:  
matchLabels:  
app: nginx  
template:  
metadata:  
labels:  
app: nginx  
spec:  
containers:  
- name: nginx  
image: 10.12.161.142:6000/nginx:1.0.0  
ports:  
- containerPort: 80  
imagePullSecrets:

- name: regcred  
ports:  
- containerPort: 80

but it get error below.

# kubectl create -f test03.yaml

error: error validating “test03.yaml”: error validating data: [ValidationError(Deployment): unknown field “imagePullSecrets” in io.k8s.api.apps.v1.Deployment, ValidationError(Deployment): unknown field “ports” in io.k8s.api.apps.v1.Deployment]; if you choose to ignore these errors, turn validation off with --validate=false

Any idea?

Regards  
Thanks…KEN

---

<div class="post-metadata">

**Author:** ![lywwing](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@lywwing](https://discuss.kubernetes.io/u/lywwing)\
**Post date:** [September 2, 2020, 2:17am UTC](https://discuss.kubernetes.io/t/pull-image-from-nexus-3-get-error-http-server-gave-http-response-to-https-cleint/12655/4 "2020-09-02T02:17:01Z")

</div>

> [@lywwing](#):
>
> apiVersion: apps/v1  
> kind: Deployment  
> metadata:  
> name: nginx-deployment  
> labels:  
> app: nginx  
> spec:  
> replicas: 1  
> selector:  
> matchLabels:  
> app: nginx  
> template:  
> metadata:  
> labels:  
> app: nginx  
> spec:  
> containers:
> 
> - name: nginx  
> image: 10.12.161.142:6000/nginx:1.0.0  
> ports:
> - containerPort: 80  
> imagePullSecrets:
> 
> - name: regcred  
> ports:
> 
> - containerPort: 80

Hi,  
I re-order the yaml file as below, it can success create the pod without above error “http: server gave HTTP response to HTTPS client”

apiVersion: apps/v1  
kind: Deployment  
metadata:  
name: nginx-deployment  
labels:  
app: nginx  
spec:  
replicas: 1  
selector:  
matchLabels:  
app: nginx  
template:  
metadata:  
labels:  
app: nginx  
spec:  
imagePullSecrets:  
- name: regcred  
containers:  
- name: nginx  
image: 10.12.161.142:6000/nginx:1.0.0

Regards  
Thanks…KEN

---

<div class="post-metadata">

**Author:** ![Vinoth](https://avatars.discourse-cdn.com/v4/letter/v/a88e4f/32.png) [@Vinoth](https://discuss.kubernetes.io/u/Vinoth)\
**Post date:** [June 12, 2023, 3:04am UTC](https://discuss.kubernetes.io/t/pull-image-from-nexus-3-get-error-http-server-gave-http-response-to-https-cleint/12655/5 "2023-06-12T03:04:46Z")

</div>

Hi,

I am also facing the same issue as below

Failed to pull image “192.168.0.53:8083/chatgpt-ai:v3”: rpc error: code = Unknown desc = Error response from daemon: Get “[https://192.168.0.53:8083/v2/](https://192.168.0.53:8083/v2/)”: http: server gave HTTP response to HTTPS client

Can anyone help me…I want to access the Nexus docker image from Kubernetes Cluster  
Thanks

---

<div class="post-metadata">

**Author:** ![Kishore\_S](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/kishore_s/32/15149_2.png) [@Kishore\_S](https://discuss.kubernetes.io/u/Kishore_S)\
**Post date:** [June 7, 2024, 9:37am UTC](https://discuss.kubernetes.io/t/pull-image-from-nexus-3-get-error-http-server-gave-http-response-to-https-cleint/12655/7 "2024-06-07T09:37:24Z")

</div>

Hi,

I am also facing the same issue as below

Failed to pull image rpc error: code = Unknown desc = Error response from daemon: Get http: server gave HTTP response to HTTPS client

Can anyone help me…I want to access the Nexus docker image from Kubernetes Cluster  
Thanks
