Q:搭建K8S 的dashboard的时候显示404 显示the server could not find the requested resource

    部署错误记录 - 图1

    A:在官网上下载最新 beta 版本,地址:https://github.com/kubernetes/dashboard


    Q: 部分 pod 处于 ContainerCreating 状态

    1. $ kubectl get pod --namespace=kube-system

    A: https://www.cnblogs.com/guyeshanrenshiwoshifu/p/9147238.html


    Q:

    1. $ kubectl create -f recommended.yaml
    2. namespace/kubernetes-dashboard created
    3. serviceaccount/kubernetes-dashboard created
    4. service/kubernetes-dashboard created
    5. secret/kubernetes-dashboard-certs created
    6. secret/kubernetes-dashboard-csrf created
    7. secret/kubernetes-dashboard-key-holder created
    8. configmap/kubernetes-dashboard-settings created
    9. role.rbac.authorization.k8s.io/kubernetes-dashboard created
    10. rolebinding.rbac.authorization.k8s.io/kubernetes-dashboard created
    11. deployment.apps/kubernetes-dashboard created
    12. service/dashboard-metrics-scraper created
    13. deployment.apps/dashboard-metrics-scraper created
    14. Error from server (AlreadyExists): error when creating "recommended.yaml": clusterroles.rbac.authorization.k8s.io "kubernetes-dashboard" already exists
    15. Error from server (AlreadyExists): error when creating "recommended.yaml": clusterrolebindings.rbac.authorization.k8s.io "kubernetes-dashboard" already exists

    A:

    1. # 删除重新安装
    2. $ kubectl delete -f kubernetes-dashboard.yaml

    Q:打开 dashborad 网页报安全警告

    部署错误记录 - 图2

    A: 直接在页面上输入 thisisunsafe


    Q:

    1. $ sudo kubeadm init --kubernetes-version=v1.14.1 --pod-network-cidr=192.168.0.0/16
    2. [init] Using Kubernetes version: v1.14.1
    3. [preflight] Running pre-flight checks
    4. error execution phase preflight: [preflight] Some fatal errors occurred:
    5. [ERROR CRI]: container runtime is not running: output: Cannot connect to the Docker daemon at tcp://localhost:2375. Is the docker daemon running?
    6. , error: exit status 1
    7. [ERROR IsDockerSystemdCheck]: cannot execute 'docker info': exit status 1
    8. [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables contents are not set to 1
    9. [preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
    10. [root@master vagrant]# sudo kubeadm init --kubernetes-version=v1.14.1 --pod-network-cidr=192.168.33.10/24
    11. [init] Using Kubernetes version: v1.14.1
    12. [preflight] Running pre-flight checks
    13. error execution phase preflight: [preflight] Some fatal errors occurred:
    14. [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables contents are not set to 1
    15. [preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`

    A:

    1. $ echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
    2. $ echo 1 > /proc/sys/net/bridge/bridge-nf-call-ip6tables