minikube windows hyperx填坑记
2021-06-10 08:02
标签:als pull boa 一个 注意 xposed 代理 node kubectl 其中需要按SSR翻QIANG代理情况改写内部IP minikube service kube-nginx --url docker rm -vf $(docker ps -a -q) docker rmi -f $(docker images -a -q) docker system prune -a --volumes minikube windows hyperx填坑记 标签:als pull boa 一个 注意 xposed 代理 node kubectl 原文地址:https://www.cnblogs.com/francis67/p/10623560.htmlminikube windows hyperx填坑记
安装了一天半,还是没行,先放弃
开始
minikube start --vm-driver=hyperv --hyperv-virtual-switch=k8svswitch --cpus=4 --memory=4096
--docker-env HTTP_PROXY=http://192.168.31.77:1080 --docker-env HTTPS_PROXY=http://192.168.31.77:1080 --docker-env NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.99.1/24 --alsologtostderr
## 注意!!!!千万不要加这个,国内好多博主加了这条,神坑了半天
--registry-mirror=https://registry.docker-cn.com
systemctl enable docker.service
kubeadm config images pull
下载需要的镜像
kubeadm config images list |sed -e 's/^/docker pull /g' -e 's#k8s.gcr.io#docker.io/mirrorgooglecontainers#g' |sh -x
上面下不了的手动
docker pull coredns/coredns:1.3.1
docker pull mirrorgooglecontainers/kube-addon-manager:v9.0
docker pull mirrorgooglecontainers/kubernetes-dashboard-amd64:v1.10.1
docker pull hawsers/storage-provisioner:v1.8.1
TAG
重命名镜像
docker images |grep mirrorgooglecontainers |awk '{print "docker tag ",$1":"$2,$1":"$2}' |sed -e 's#mirrorgooglecontainers#k8s.gcr.io#2' |sh -x
手动
docker tag coredns/coredns:1.3.1 k8s.gcr.io/coredns:1.3.1
docker tag mirrorgooglecontainers/kube-addon-manager:v9.0 k8s.gcr.io/kube-addon-manager:v9.0
docker tag mirrorgooglecontainers/kubernetes-dashboard-amd64:v1.10.1 k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.1
docker tag hawsers/storage-provisioner:v1.8.1 gcr.io/k8s-minikube/storage-provisioner:v1.8.1
删除
删除mirrorgooglecontainers镜像
docker images |grep mirrorgooglecontainers |awk '{print "docker rmi ", $1":"$2}' |sh -x
手动
docker rmi coredns/coredns:1.3.1
docker rmi mirrorgooglecontainers/kube-addon-manager:v9.0
docker rmi mirrorgooglecontainers/kubernetes-dashboard-amd64:v1.10.1
docker rmi hawsers/storage-provisioner:v1.8.1
kubectl get pods
minikube service kube-nginx --url
minikube logs
minikube dashboard
Docker 基本操作
To delete all containers including its volumes use,
To delete all the images
Use this to delete everything:
3.3 启动一个服务
创建一个 Nginx Pod 服务
$ kubectl run kube-nginx --image=nginx:latest --port=80
deployment.apps/kube-nginx created
通过 NodePort 暴露服务
$ kubectl expose deployment kube-nginx --type=NodePort
service/kube-nginx exposed
检查 Pod 状态
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
kube-nginx-6d8f6d45-rwz2g 1/1 Running 0 1d
docker logs --tail 200 c8b9a4c46345
kubectl get pods --all-namespaces
kubectl get svc
上一篇:c# 动态加载dll文件
文章标题:minikube windows hyperx填坑记
文章链接:http://soscw.com/index.php/essay/93053.html