I've followed the instructions at link to setup docker-from-docker, kubectl, helm and minikube. But, whenever I run, kubectl get po -A, I get an error (except with host networking).
~/.kube/config:
apiVersion: v1
clusters:
- cluster:
certificate-authority: /home/vscode/.minikube/ca.crt
extensions:
- extension:
last-update: Wed, 06 Apr 2022 16:34:41 UTC
provider: minikube.sigs.k8s.io
version: v1.25.2
name: cluster_info
server: https://<ip_address>:8443
name: minikube
current-context: minikube
kind: Config
preferences: {}
- name: minikube
user:
client-certificate: /home/vscode/.minikube/client.crt
client-key: /home/vscode/.minikube/client.key
I've tried the following:
- default config with
minikube ipaddress for<ip_address>- doesn't work, error:Unable to connect to the server: dial tcp <ip_address>:8443: i/o timeout - replacing
<ip_address>with172.17.0.1in~/.kube/configwhich I got from https://stackoverflow.com/a/48547074 - doesn't work, error:Unable to connect to the server: dial tcp 172.17.0.1:8443: i/o timeout - adding
--add-host=host.docker.internal:host-gatewaytodevcontainer.json#runArgsand replacing<ip_address>withhost.docker.internalin~/.kube/configwhich I got from https://stackoverflow.com/a/62431165/4812758, doesn't work, error:The connection to the server host.docker.internal:8443 was refused - did you specify the right host or port? - adding
--network=host, works but I want to keep the container network isolated from the host network
- Host OS: Debian
- Docker version: 20.10.2
- Minikube version: v1.25.2
- Image: mcr.microsoft.com/vscode/devcontainers/go:0-1.17