0

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:

  1. default config with minikube ip address for <ip_address> - doesn't work, error: Unable to connect to the server: dial tcp <ip_address>:8443: i/o timeout
  2. replacing <ip_address> with 172.17.0.1 in ~/.kube/config which 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
  3. adding --add-host=host.docker.internal:host-gateway to devcontainer.json#runArgs and replacing <ip_address> with host.docker.internal in ~/.kube/config which 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?
  4. adding --network=host, works but I want to keep the container network isolated from the host network
Daron
  • 1
  • 1

0 Answers0