安装minikube
Install kubectl binary with curl on Linux
https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/
minikube
https://minikube.sigs.k8s.io/docs/start/
遇到的问题:
X Exiting due to MK_USAGE: 'none' driver does not support 'minikube ssh' command
解决:
adduser alpha
usermod -aG docker alpha && newgrp docker
su - alpha
minikube start --driver=docker
kubectl get pods
ImagePullBackOff
The status ImagePullBackOff
means that a Pod couldn’t start because Kubernetes could not pull a container image. The ‘BackOff’ part indicates that Kubernetes will keep trying to pull the image, with an increasing back-off delay.
原因:! minikube was unable to download gcr.io/k8s-minikube/kicbase:v0.0.27, but successfully downloaded docker.io/kicbase/stable:v0.0.27 as a fallback image
,应该是镜像拉取不下来。
解决:
minikube start --image-mirror-country cn --iso-url=https://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/iso/minikube-v1.5.0.iso --registry-mirror=https://pe3ox7bd.mirror.aliyuncs.com --driver=docker --memory=2048
Create a sample deployment and expose it on port 8080:
1 2 3 | kubectl create deployment hello-minikube --image=registry.cn-hangzhou.aliyuncs.com/google_containers/echoserver:1.4 kubectl expose deployment hello-minikube --type=NodePort --port=8080 |
访问:NodePort
kubectl get svc
minikube service mysvc, url浏览器访问
执行
minikube tunnel
报错:
errors:
minikube: no errors
router: no errors
loadbalancer emulator: no errors
解决:
Please keep in mind that minikube tunnel
session must be opened whole the time otherwise your LB will stop getting IP address.
1 | kubectl get services balanced |
链接:https://stackoverflow.com/questions/58790433/cannot-export-a-ip-in-minikube-and-haproxy-loadbalancer
参考链接:
https://zhuanlan.zhihu.com/p/241030384
https://v1-18.docs.kubernetes.io/zh/docs/setup/learning-environment/minikube/
https://stackoverflow.com/questions/52698748/connection-refused-on-pushing-a-docker-image
https://stackoverflow.com/questions/68984450/minikube-why-the-docker-driver-should-not-be-used-with-root-privileges
https://www.ithands-on.com/2020/12/minikube-101-error-exiting-due-to.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南