How to run docker hub image in minikube, seems like minikube doesn't connect to docker hub to download docker image by default.
With image tag
kubectl create deployment hello-nginx --image=nginx
Related
I was using kubectl with Docker Desktop - everything was fine
I think logged into Openshift via the Command line and kubectl seemed to point to OC cluster
I then logged out of Openshift and now kubectl doesn't seem to point at anything? How do I get to point it at docker desktop again?
sorted - kubectl config use-context docker-desktop
Able to ssh to minikube, but not in docker-desktop node in Kubernetes ?
From a minikube instance, the idea is not to ssh to docker desktop, but to use docker directly through:
eval $(minikube docker-env)
See "Goodbye Docker Desktop, Hello Minikube!" from Abhinav Sonkar as an example.
Minikube application stops everyday and shows below error,
ubuntu#ubuntu:~$ kubectl get pods
Unable to connect to the server: dial tcp 192.168.58.2:8443: connect: no route to host
After running below command, it comes back to normal.
ubuntu#ubuntu:~$ minikube start
Please let me know if there any way to keep it up all the time.
Output of minikube start command.
kalpesh#kalpesh:~$ minikube start
😄 minikube v1.24.0 on Ubuntu 20.04
✨ Using the docker driver based on existing profile
👍 Starting control plane node minikube in cluster minikube
🚜 Pulling base image ...
🔄 Restarting existing docker container for "minikube" ...
🐳 Preparing Kubernetes v1.22.3 on Docker 20.10.8 ...
🔎 Verifying Kubernetes components...
▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
▪ Using image kubernetesui/dashboard:v2.3.1
▪ Using image kubernetesui/metrics-scraper:v1.0.7
🌟 Enabled addons: default-storageclass, storage-provisioner, dashboard
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
Minikube config
kalpesh#kalpesh:~$ minikube config view
- cache: map[stock_updates_stock_updates:latest:<nil>]
- cpus: 4
- memory: 8192
It can be the issue with your firewall, try to disable it like:
sudo ufw disable
OR
Get your minikube VM's IP and do the following command in order to create a rich firewall rule to allow all traffic from this VM to your Host:
$ firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="YOUR.IP.ADDRESS.HERE" accept'
I am getting unknown image flag when creating a deployment using minikube on windows 10 cmd. Why?
C:\WINDOWS\system32>minikube kubectl create deployment nginxdepl --image=nginx
Error: unknown flag: --image
See 'minikube kubectl --help' for usage.
C:\WINDOWS\system32>
When using kubectl bundled with minikube the command is little different.
From the documentation, your command should be:
minikube kubectl -- create deployment nginxdepl --image=nginx
The difference is the -- right after kubectl
there problem is your command. you are mixing kubectl and minikube.
minikube is for managing your one-node local dev cluster.
kubectl is used for interacting with your cluster.
you should be using the following command:
kubectl create deployment nginxdepl --image nginx
I am trying to start a Bro container in a Pod. In docker I would normally run something like this:
docker run -d --net=host --name bro
Is there something in the container spec that would replicate that functionality?
You can use the hostNetwork option of the API to run a pod on the host's network.