zoukankan      html  css  js  c++  java
  • 安装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:

      

    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.

    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

  • 相关阅读:
    实习的一些感想,感触,心得体会
    一张优惠券引发的血案(redis并发安全问题)
    Java各种对象(PO,BO,VO,DTO,POJO,DAO,Entity,JavaBean,JavaBeans)的区分
    Redis 集群
    Maven Pom文件标签详解
    Google Guava 基本工具
    context:component-scan的使用说明
    logback的简单分析
    轮询和长轮询
    StringUtils中 isNotEmpty 和isNotBlank的区别?
  • 原文地址:https://www.cnblogs.com/parkdifferent/p/15368141.html
Copyright © 2011-2022 走看看