Q:搭建K8S 的dashboard的时候显示404 显示the server could not find the requested resource
A:在官网上下载最新 beta 版本,地址:https://github.com/kubernetes/dashboard
Q: 部分 pod 处于 ContainerCreating 状态
$ kubectl get pod --namespace=kube-system
A: https://www.cnblogs.com/guyeshanrenshiwoshifu/p/9147238.html
Q:
$ kubectl create -f recommended.yaml
namespace/kubernetes-dashboard created
serviceaccount/kubernetes-dashboard created
service/kubernetes-dashboard created
secret/kubernetes-dashboard-certs created
secret/kubernetes-dashboard-csrf created
secret/kubernetes-dashboard-key-holder created
configmap/kubernetes-dashboard-settings created
role.rbac.authorization.k8s.io/kubernetes-dashboard created
rolebinding.rbac.authorization.k8s.io/kubernetes-dashboard created
deployment.apps/kubernetes-dashboard created
service/dashboard-metrics-scraper created
deployment.apps/dashboard-metrics-scraper created
Error from server (AlreadyExists): error when creating "recommended.yaml": clusterroles.rbac.authorization.k8s.io "kubernetes-dashboard" already exists
Error from server (AlreadyExists): error when creating "recommended.yaml": clusterrolebindings.rbac.authorization.k8s.io "kubernetes-dashboard" already exists
A:
# 删除重新安装
$ kubectl delete -f kubernetes-dashboard.yaml
Q:打开 dashborad 网页报安全警告
A: 直接在页面上输入 thisisunsafe
Q:
$ sudo kubeadm init --kubernetes-version=v1.14.1 --pod-network-cidr=192.168.0.0/16
[init] Using Kubernetes version: v1.14.1
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR CRI]: container runtime is not running: output: Cannot connect to the Docker daemon at tcp://localhost:2375. Is the docker daemon running?
, error: exit status 1
[ERROR IsDockerSystemdCheck]: cannot execute 'docker info': exit status 1
[ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables contents are not set to 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
[root@master vagrant]# sudo kubeadm init --kubernetes-version=v1.14.1 --pod-network-cidr=192.168.33.10/24
[init] Using Kubernetes version: v1.14.1
[preflight] Running pre-flight checks
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
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
A:
$ echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
$ echo 1 > /proc/sys/net/bridge/bridge-nf-call-ip6tables