I recently started learning Kubernetes using Minikube locally on my Mac. Previously, I was able to start a local Kubernetes cluster with Minikube 0.10.0, created a deployment, and looked at the Kubernetes toolbar.
Yesterday I tried to remove the cluster and redo everything from scratch. However, I found that I could not deploy assets and could not view the panel. From what I saw, everything seemed to get stuck while creating the container.
After I launched minikube start , it reported
Starting local Kubernetes cluster... Kubectl is now configured to use the cluster.
When I ran kubectl get pods --all-namespaces , it reported (note the STATUS column):
kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system kube-addon-manager-minikube 0/1 ContainerCreating 0 51s
docker ps didn't show anything:
docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
minikube status tells me that the VM and cluster are running:
minikubeVM: Running localkube: Running
If I tried to create a deployment and autoscaler, I was told that they were successfully created:
kubectl create -f configs deployment "hello-minikube" created horizontalpodautoscaler "hello-minikube-autoscaler" created $ kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE default hello-minikube-661011369-1pgey 0/1 ContainerCreating 0 1m default hello-minikube-661011369-91iyw 0/1 ContainerCreating 0 1m kube-system kube-addon-manager-minikube 0/1 ContainerCreating 0 21m
When exhibiting the service, he said:
$ kubectl expose deployment hello-minikube --type=NodePort service "hello-minikube" exposed $ kubectl get service NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE hello-minikube 10.0.0.32 <nodes> 8080/TCP 6s kubernetes 10.0.0.1 <none> 443/TCP 22m
When I tried to access the service, they told me:
curl $(minikube service hello-minikube --url) Waiting, endpoint for service is not ready yet...
docker ps still didn't show anything. It seemed to me that everything was stuck when creating the container. I tried other ways to get around this problem:
- Upgraded to minikube 0.11.0
- Use xhyve driver instead of Virtualbox driver
- Delete all cached files, e.g. ~ / .minikube, ~ / .kube and the cluster, and try again
None of them worked for me.
Kubernetes is still a beginner, and I would like to know:
- How to fix this problem?
- What could be causing this problem?
Any help is appreciated. Thanks.