kubectl run nginx ,minikube Ubuntu apiserver 18.04 issue

10/29/2019

Errors while setting up CI/CD environment in Ubuntu 18.04 in Parallel Desktop environment: There is an issue connecting with proxy and running nginx image. I am trying to setup kubernetes CI CD environment on Ubuntu, but I am getting few errors related to apiserver proxy and kubectl get pods command is failing with unable to connect message.

$sudo minikube start --memory 8000 --cpus 2 --kubernetes-version v1.11.10 --vm-driver none

Wait failed: waiting for k8s-app=kube-proxy: timed out waiting for the condition


$kubectl run nginx --image nginx --port 80

error: failed to discover supported resources: Get https://192.168.64.19:8443/apis/apps/v1?timeout=32s: net/http: TLS handshake timeout

Below are docker, kubectl & minikube version version used:

$ docker --version
Docker version 18.09.7, build 2d0083d

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:18:23Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?

$ minikube version
minikube version: v1.5.0
commit: d1151d93385a70c5a03775e166e94067791fe2d9

Content of ~/.kube/config content

apiVersion: v1
clusters:
- cluster:
    certificate-authority: /home/parallels/.minikube/ca.crt
    server: https://192.168.64.19:8443
  name: minikube
contexts:
- context:
    cluster: minikube
    user: minikube
  name: minikube
current-context: ""
kind: Config
preferences: {}
users:
- name: minikube
  user:
    client-certificate: /home/parallels/.minikube/client.crt
    client-key: /home/parallels/.minikube/client.key
-- Penguin Tech
docker
kubectl
kubernetes
minikube
ubuntu-18.04

0 Answers