I have three servers:
1 master: 192.168.1.131 k8s
1 node: 192.168.1.132 k8s
1 rancher: 192.168.1.133 rancher 2.6
I have created a docker image (private registry docker) on the node used 192.168.1.132:5000/test.
Both master and node pushed and pulled to the image. But used rancher deploy set image 192.168.1.132:5000/test then error:
Failed to pull image “192.168.1.132:5000/test-demo”: rpc error: code = Unknown desc = failed to pull and unpack image “192.168.1.132:5000/test-demo:latest”: failed to resolve reference “192.168.1.132:5000/test-demo:latest”: failed to do request: Head “https://192.168.1.132:5000/v2/test-demo/manifests/latest”: http: server gave HTTP response to HTTPS client.
My image used
http
not https
. But the rancher sends HTTPS.
This is image problem
You may try this out by adding one line to the daemon.json file
The configuration file can be found at 'C:\ProgramData\Docker\config\daemon.json'. You can create this file if it doesn't already exist.
"insecure-registries": [
"192.168.1.132:5000"
]
Then restart the docker service hope solves the issue.
Raff: