美文网首页
minikube安装

minikube安装

作者: 昵称_9eb2 | 来源:发表于2020-10-28 17:14 被阅读0次

    minikube还是选用国内阿里社区提供的方法比较简单,具体链接如下:

    https://developer.aliyun.com/article/221687
    
    1. 安装kubectl
      可以现在本地下载好安装文件,远程拷贝到服务器
    curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.19.0/bin/linux/amd64/kubectl
    chmod +x ./kubectl
    sudo mv ./kubectl /usr/local/bin/kubectl
    
    1. 安装minikube
    curl -Lo minikube https://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v1.13.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
    

    3.启动minikube

    minikube start --driver=none  # --driver=docker/kvm2 比较复杂
    

    报错及解决

    1. minikube start 报错
    error execution phase preflight: [preflight] Some fatal errors occurred:
            [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables contents are not set to 1
    

    解决方案

    echo "1" >/proc/sys/net/bridge/bridge-nf-call-iptables
    
    1. https://IP:8443 访问报错
    {
      "kind": "Status",
      "apiVersion": "v1",
      "metadata": {
        
      },
      "status": "Failure",
      "message": "forbidden: User \"system:anonymous\" cannot get path \"/\"",
      "reason": "Forbidden",
      "details": {
        
      },
      "code": 403
    }
    

    解决方案

    kubectl create clusterrolebinding test:anonymous --clusterrole=cluster-admin --user=system:anonymous
    

    相关文章

      网友评论

          本文标题:minikube安装

          本文链接:https://www.haomeiwen.com/subject/mhhcvktx.html