Closed jasperf closed 4 years ago
Doing a brew uninstall minikube
, brew install minikube
nor brew reinstall minikube
changed the situation. Still miss the client.cert
and client.key
:
kubectl cluster-info
Error in configuration:
* unable to read client-cert /Users/jasper/.minikube/profiles/minikube/client.crt for minikube due to open /Users/jasper/.minikube/profiles/minikube/client.crt: no such file or directory
* unable to read client-key /Users/jasper/.minikube/profiles/minikube/client.key for minikube due to open /Users/jasper/.minikube/profiles/minikube/client.key: no such file or directory
Also config as shown here does try to load the certs.. but they are just not there.
cat ~/.kube/config
apiVersion: v1
clusters:
- cluster:
certificate-authority: /Users/jasper/.minikube/ca.crt
server: https://192.168.64.3:8443
name: minikube
contexts:
- context:
cluster: minikube
user: minikube
name: minikube
current-context: minikube
kind: Config
preferences: {}
users:
- name: minikube
user:
client-certificate: /Users/jasper/.minikube/profiles/minikube/client.crt
client-key: /Users/jasper/.minikube/profiles/minikube/client.key
A similar issue was mentioned at https://github.com/kubernetes/kubernetes/issues/76477 but closed and referred to the Minikube repository
Hmm it seems they are located elsewhere
➜ minikube pwd
/Users/jasper/.minikube/profiles/minikube
➜ minikube cd ..
➜ profiles pwd
/Users/jasper/.minikube/profiles
➜ profiles ll
total 64
-rw-r--r-- 1 jasper staff 1.3K Jun 3 06:34 apiserver.crt
-rw-r--r-- 1 jasper staff 1.3K Jun 3 06:34 apiserver.crt.40f8bebd
-rw------- 1 jasper staff 1.6K Jun 3 06:34 apiserver.key
-rw------- 1 jasper staff 1.6K Jun 3 06:34 apiserver.key.40f8bebd
-rw-r--r-- 1 jasper staff 1.1K Jun 3 06:34 client.crt
-rw------- 1 jasper staff 1.6K Jun 3 06:34 client.key
drwx------ 3 jasper staff 96B Jun 3 06:32 minikube
-rw-r--r-- 1 jasper staff 1.1K Jun 3 06:34 proxy-client.crt
-rw------- 1 jasper staff 1.6K Jun 3 06:34 proxy-client.key
Will see how I can make Minikube load from correct location. Or move them. Also wonder how on earth this then changed?!
Did a nano ~/.kube/config
and adjusted the path
cat ~/.kube/config
apiVersion: v1
clusters:
- cluster:
certificate-authority: /Users/jasper/.minikube/ca.crt
server: https://192.168.64.3:8443
name: minikube
contexts:
- context:
cluster: minikube
user: minikube
name: minikube
current-context: minikube
kind: Config
preferences: {}
users:
- name: minikube
user:
client-certificate: /Users/jasper/.minikube/profiles/client.crt
client-key: /Users/jasper/.minikube/profiles/client.key
Now all is well again:
kubectl cluster-info
Kubernetes master is running at https://192.168.64.3:8443
KubeDNS is running at https://192.168.64.3:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
sometimes better to shoot this command. it apply client.crt
minikube start
Updated Minikube on my Mac using
Then I started Minikube anew:
The main issues indicated being
Client Cert and Key Missing
They are not there. I checked:
Json Config
Only the config file:
Optional: Full output of
minikube logs
command:How to get the
client.key
andclient.crt
for local testing of deployments and so on?