• 安装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

  • 相关阅读:
    JSON以及Java转换JSON的方法(前后端经常使用处理方法)
    让cocos2dx支持并通过arm64 编译
    matlab7安装后的常见问题
    Open SSH原理
    Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization
    12C -- 配置EM Express的端口
    ORA-16179: incremental changes to "log_archive_dest_1" not allowed with SPFILE
    ORA-16019: cannot use LOG_ARCHIVE_DEST_1 with LOG_ARCHIVE_DEST or LOG_ARCHIVE_DUPLEX_DEST
    11g新特性-SQL Plan Management
    11g新特性-自动sql调优(Automatic SQL Tuning)
  • 原文地址:https://www.cnblogs.com/parkdifferent/p/15368141.html
Copyright © 2020-2023  润新知