RKE version:
./rke -v
rke version v0.3.1
Docker version: (docker version,docker info preferred)
docker version
Client:
Version: 18.09.8-ce
API version: 1.39
Go version: go1.12.6
Git commit: 0dd43dd87fd530113bf44c9bba9ad8b20ce4637f
Built: Sat Jul 20 15:20:06 2019
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.09.8-ce
API version: 1.39 (minimum version 1.12)
Go version: go1.12.6
Git commit: 0dd43dd87fd530113bf44c9bba9ad8b20ce4637f
Built: Sat Jul 20 15:19:08 2019
OS/Arch: linux/amd6
docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 18.09.8-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: d50db0a42053864a270f648048f9a8b4f24eced3
runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
init version: v0.18.0 (expected: fec3683b971d9c3ef73f284f176672c44b448662)
Security Options:
seccomp
Profile: default
Kernel Version: 4.19.80-0-virt
Operating System: Alpine Linux v3.10
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 7.787GiB
Name: localhost
ID: RYLK:6JKA:5VMF:DNSF:NDVI:OQG2:3SC3:4J7X:6X4M:ADPZ:JQGS:3JUX
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Registry Mirrors:
https://docker.mirrors.ustc.edu.cn/
Live Restore Enabled: false
WARNING: No swap limit support
Operating system and kernel: (cat /etc/os-release, uname -r preferred)
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.10.2
PRETTY_NAME="Alpine Linux v3.10"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
uname -r
4.19.80-0-virt
Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO)
qemu
cluster.yml file:
# If you intened to deploy Kubernetes in an air-gapped environment,
# please consult the documentation on how to configure custom RKE images.
ssh_agent_auth: true
nodes:
- address: 10.0.2.15
port: "22"
internal_address: ""
role:
- worker
- controlplane
- etcd
hostname_override: "r1-n1"
user: admin
docker_socket: /var/run/docker.sock
ssh_key: ""
ssh_key_path: /opt/k8s/id
ssh_cert: ""
ssh_cert_path: ""
labels: {}
taints: []
services:
etcd:
image: ""
extra_args: {}
extra_binds: []
extra_env: []
external_urls: []
ca_cert: ""
cert: ""
key: ""
path: ""
uid: 0
gid: 0
snapshot: null
retention: ""
creation: ""
backup_config: null
kube-api:
image: ""
extra_args: {}
extra_binds: []
extra_env: []
service_cluster_ip_range: 10.43.0.0/16
service_node_port_range: ""
pod_security_policy: false
always_pull_images: false
kube-controller:
image: ""
extra_args: {}
extra_binds: []
extra_env: []
cluster_cidr: 10.42.0.0/16
service_cluster_ip_range: 10.43.0.0/16
scheduler:
image: ""
extra_args: {}
extra_binds: []
extra_env: []
kubelet:
image: ""
extra_args: {}
extra_binds: []
extra_env: []
cluster_domain: cluster.local
infra_container_image: ""
cluster_dns_server: 10.43.0.10
fail_swap_on: false
kubeproxy:
image: ""
extra_args: {}
extra_binds: []
extra_env: []
network:
plugin: canal
options: {}
node_selector: {}
authentication:
strategy: x509
sans: []
webhook: null
addons: ""
addons_include: []
system_images:
etcd: ""
alpine: ""
nginx_proxy: ""
cert_downloader: ""
kubernetes_services_sidecar: ""
kubedns: ""
dnsmasq: ""
kubedns_sidecar: ""
kubedns_autoscaler: ""
coredns: ""
coredns_autoscaler: ""
kubernetes: ""
flannel: ""
flannel_cni: ""
calico_node: ""
calico_cni: ""
calico_controllers: ""
calico_ctl: ""
calico_flexvol: ""
canal_node: ""
canal_cni: ""
canal_flannel: ""
canal_flexvol: ""
weave_node: ""
weave_cni: ""
pod_infra_container: ""
ingress: ""
ingress_backend: ""
metrics_server: ""
windows_pod_infra_container: ""
ssh_key_path: /opt/k8s/id
ssh_cert_path: ""
ssh_agent_auth: false
authorization:
mode: rbac
options: {}
ignore_docker_version: true
kubernetes_version: "v1.16.1-rancher1-1"
private_registries: []
ingress:
provider: ""
options: {}
node_selector: {}
extra_args: {}
dns_policy: ""
cluster_name: ""
cloud_provider:
name: ""
prefix_path: ""
addon_job_timeout: 0
bastion_host:
address: ""
port: ""
user: ""
ssh_key: ""
ssh_key_path: ""
ssh_cert: ""
ssh_cert_path: ""
monitoring:
provider: ""
options: {}
node_selector: {}
restore:
restore: false
snapshot_name: ""
dns: null
Steps to Reproduce:
./rke up --local --config cluster.yml
Results:
INFO[0000] Running RKE version: v0.3.1
INFO[0000] Initiating Kubernetes cluster
INFO[0000] [certificates] Generating admin certificates and kubeconfig
INFO[0000] Successfully Deployed state file at [./cluster.rkestate]
INFO[0000] Building Kubernetes cluster
FATA[0000] Failed to connect to docker for local host [127.0.0.1]: Can't retrieve Docker Info: Error response from daemon: client version 1.41 is too new. Maximum supported API version is 1.39
Execute the docker version command on the host to check the Server API version and Client API version. The two API versions should be the same.
output in the issues
docker version
Client:
Version: 18.09.8-ce
API version: 1.39
Go version: go1.12.6
Git commit: 0dd43dd87fd530113bf44c9bba9ad8b20ce4637f
Built: Sat Jul 20 15:20:06 2019
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.09.8-ce
API version: 1.39 (minimum version 1.12)
Go version: go1.12.6
Git commit: 0dd43dd87fd530113bf44c9bba9ad8b20ce4637f
Built: Sat Jul 20 15
I'm seeing this as well, it appears that --local ignores ignore_docker_version: true
I use the DOCKER_API_VERSION env var to fix this. But when I reinstall the rke, the problem was solved, 0.3.2
ctx := context.Background()
cli, err := client.NewClientWithOpts(client.FromEnv)
if err != nil {
panic(err)
}
cli.NegotiateAPIVersion(ctx)
@wenerme NegotiateAPIVersion function seems like it can negotiate API version and solve this issue. At least, it solved this problem for me.
Most helpful comment
@wenerme NegotiateAPIVersion function seems like it can negotiate API version and solve this issue. At least, it solved this problem for me.