docker导出日志到本地的方法是什么
239
2022-10-21
Kubernetes-kubectl命令 The connection to the server localhost:8080 was refused -
[root@docker001 yum.repos.d]# kubectl get pods --all-namespacesThe connection to the server localhost:8080 was refused - did you specify the right host or port?[root@docker001 yum.repos.d]# ll /etc/kubernetes/admin.conf-rw------- 1 root root 5450 Oct 23 14:10 /etc/kubernetes/admin.conf[root@docker001 yum.repos.d]# echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> ~/.bash_profile[root@docker001 yum.repos.d]# source ~/.bash_profile[root@docker001 yum.repos.d]# source ~/.bash_profile[root@docker001 yum.repos.d]# kubectl get pods --all-namespacesNAMESPACE NAME READY STATUS RESTARTS AGEkube-system coredns-5644d7b6d9-8vbs4 0/1 Pending 0 5m39skube-system coredns-5644d7b6d9-jc4zk 0/1 Pending 0 5m39skube-system etcd-docker001 1/1 Running 0 4m47skube-system kube-apiserver-docker001 1/1 Running 0 4m22skube-system kube-controller-manager-docker001 1/1 Running 0 4m42skube-system kube-proxy-bxhpn 1/1 Running 0 5m39skube-system kube-scheduler-docker001 1/1 Running 0 4m33s[root@docker001 yum.repos.d]#
主:master节点 /etc/kubernetes/admin.conf 复制过来
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~