After use command kubevpn dev
enter develop mode,but can't assess kubernetes api-server,occur error 172.17.0.1:443 connect refusued
,how to solve this problem?
Answer:
Maybe k8s network subnet is conflict with docker subnet
Solution:
- Use option
--connect-mode container
to startup commandkubevpn dev
- Modify
~/.docker/daemon.json
, add not conflict subnet, eg:"bip": "172.15.0.1/24"
.
➜ ~ cat ~/.docker/daemon.json
{
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
}
},
"experimental": false,
"features": {
"buildkit": true
},
"insecure-registries": [
],
}
add subnet not conflict, eg: 172.15.0.1/24
➜ ~ cat ~/.docker/daemon.json
{
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
}
},
"experimental": false,
"features": {
"buildkit": true
},
"insecure-registries": [
],
"bip": "172.15.0.1/24"
}
restart docker and retry