blog/archive/docs/docker&k8s/踩坑记录.md
2024-03-19 02:45:09 +08:00

40 lines
1.6 KiB
Markdown

### minikube安装之后 kubectl get node 无效
需要移除http_proxy不要使用代理
### nginx无法反代其他端口
查看日志:
connect() to 127.0.0.1:8080 failed (13: Permission denied)
解决:
修改SeLinux
```bash
setsebool -P httpd_can_network_connect 1
```
### minikube安装面板无法访问
报错Error while initializing connection to Kubernetes apiserver. This most likely means that the cluster is misconfigured (e.g., it has invalid apiserver certificates or service account's configuration) or the --apiserver-host param points to a server that does not exist. Reason: Get https://10.96.0.1:443/version: dial tcp 10.96.0.1:443: connect: no route to host
Refer to our FAQ and wiki pages for more information: https://github.com/kubernetes/dashboard/wiki/FAQ
解决:
https://blog.csdn.net/shida_csdn/article/details/80028905
```bash
# systemctl stop kubelet
# systemctl stop docker
# iptables --flush
# iptables -tnat --flush
# systemctl start kubelet
# systemctl start docker
```
### docker私有仓库
需要在 /etc/docker/certs.d 下建立域名为名称的文件夹,放入ca.crt证书
### golang module私有仓库
> 当天就更新了go1.13
主要是设置git的(注意配置.ssh秘钥之类)
```
[url "ssh://git@xxxxx"]
insteadOf = https://xxxx
```
私有仓库参考文章:https://mp.weixin.qq.com/s?__biz=MzU3Mzk5OTk1OQ==&mid=2247483702&idx=1&sn=d2a97191cec84ca59a3c63c7de273aeb&chksm=fd385f0eca4fd618dbb63bc01e50297a075663e8f6b401fe9171fa69fae9bd088de67f1fbe9b&mpshare=1&scene=23&srcid=0905LuIt21jXoWgVuNwcdzRO&sharer_sharetime=1567642857821&sharer_shareid=8b453be2580fa2f2bbcdf77f41134328#rd