k3s: Help! k3s 070 agent conns error by wan ip, when the server run in docker
Agent connect to k3s server by the server’s host wan ip, when the server run in docker
- server: in the machine
ali-vm1
the server’s host wan ipPort: 47.98.xxx.xxx:7441 run with docker-compose, the container’s ip:
[root@ali-vm1 v070-t]# dcp exec server bash
[root@k3-server /]#
[root@k3-server /]# ip a |grep inet
inet 127.0.0.1/8 scope host lo
inet 2.3.1.2/24 brd 2.3.1.255 scope global eth0
- agent: in the machine
hw-vm1
[root@hw-vm1 v070]# dcp -f node.yml up
Recreating v070_node_1 ... done
Attaching to v070_node_1
node_1 | time="2019-08-09T14:00:52.000382372+08:00" level=info msg="Starting k3s agent v0.7.0 (61bdd852)"
node_1 | time="2019-08-09T14:00:54.104057009+08:00" level=info msg="Logging containerd to /var/lib/rancher/k3s/agent/containerd/containerd.log"
node_1 | time="2019-08-09T14:00:54.104348928+08:00" level=info msg="Running containerd -c /var/lib/rancher/k3s/agent/etc/containerd/config.toml -a /run/k3s/containerd/containerd.sock --state /run/k3s/containerd --root /var/lib/rancher/k3s/agent/containerd"
node_1 | time="2019-08-09T14:00:54.104841131+08:00" level=info msg="Waiting for containerd startup: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = \"transport: Error while dialing dial unix /run/k3s/containerd/containerd.sock: connect: no such file or directory\""
node_1 | time="2019-08-09T14:00:55.107259392+08:00" level=info msg="module br_netfilter was already loaded"
node_1 | time="2019-08-09T14:00:55.107335659+08:00" level=info msg="module overlay was already loaded"
node_1 | time="2019-08-09T14:00:55.107344421+08:00" level=info msg="module nf_conntrack was already loaded"
node_1 | time="2019-08-09T14:00:55.236427480+08:00" level=info msg="Connecting to proxy" url="wss://2.3.1.2:6443/v1-k3s/connect"
got this and stuck: conn server with the containers’s ip: 2.3.1.2, not the server’s host wan ip.
msg="Connecting to proxy" url="wss://2.3.1.2:6443/v1-k3s/connect"
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (5 by maintainers)
@huapox hi, i Use aliyun vm and meet this problem too, Did you solve the problem by use kilo at last ?
is there any k3s-agnent cli flags can read node public ip and use it?
thanks
updates:
kiloto keep nat nodes’s connection squat/kilo#12network_mod:"host"too