Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubeasz/docs/quickStart.md 小错误 #2

Closed
sshling opened this issue Dec 2, 2017 · 3 comments
Closed

kubeasz/docs/quickStart.md 小错误 #2

sshling opened this issue Dec 2, 2017 · 3 comments

Comments

@sshling
Copy link

sshling commented Dec 2, 2017

kubectl clusterinfo # 可以看到kubernetes master(apiserver)组件 running

应该为 kubectl cluster-info
我在centos7 测试机器上是这样,

我也是第一次学习k8s, 在我机器上好几个命令报如下的错误,请教下是哪里配错了?

[root@mnode ~]# kubectl cluster-info
Kubernetes master is running at https://192.168.21.3:6443
[root@mnode ~]# kubectl get node 
The connection to the server 192.168.21.3:6443 was refused - did you specify the right host or port?

查看集群信息,地址、端口没有错呢
先谢谢

@gjmzj
Copy link
Collaborator

gjmzj commented Dec 2, 2017

1.感谢指出kubectl cluster-info
2.感觉是kubeconfig配置有点问题,检查下里面的证书等信息,
vi ~/.kube/config
你是allinone集群,还是多节点集群?

@sshling
Copy link
Author

sshling commented Dec 3, 2017

allinone集群 ,直接用root账户搞的,user: admin 跟这个有关?

# cat .kube/config 
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUR0akNDQXA2Z0F3SUJBZ0lVSThOa1ZCTmNiTXR2MzdLWlk2MFRnNENSdEVJd0RRWUpLb1pJaHZjTkFRRUwKQlFBd1lURUxNQWtHQTFVRUJoTUNRMDR4RVRBUEJnTlZCQWdUQ0VoaGJtZGFhRzkxTVFzd0NRWURWUVFIRXdKWQpVekVNTUFvR0ExVUVDaE1EYXpoek1ROHdEUVlEVlFRTEV3WlRlWE4wWlcweEV6QVJCZ05WQkFNVENtdDFZbVZ5CmJtVjBaWE13SGhjTk1UY3hNakF5TVRFeU9UQXdXaGNOTWpJeE1qQXh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eDQwTzNqTWMzN1RsUE1MVlRQdjAKS082TTZqQTdOd3RMWDQwRkVYcHFiMG0zZ3AwL3psTThUdS9vYnFhV1l2emlEK29ZTytOMy9URTg1NUFmS2RwUwpDdm0vVUUyU080aXRXVjU3SjRsOVE4ZGx5WW4rTy9JQlduMVh3ckxnZ1lUOWxnamFvVE9hQ2ZMWGJRQXEvVlMwCkxlUWVwOFJaaC9YREYrV2VZdnJveVhERjd6dDlVNXBMOG1EQWwzVUMrVU9Oa3FTcGlFeUhlWEtwemVHTjNVM0UKakM4RzQvN3hiSEZUK1FEVFZyNzBZbEsyNlB2czFjVjRTN2k1Sm05M0hwSXFVKzFyL2VwdHEwZEcKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
    server: https://192.168.21.3:6443
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: admin
  name: kubernetes
current-context: kubernetes
kind: Config
preferences: {}
users:
- name: admin
  user:
    as-user-extra: {}
    client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUQxVENDQXIyZ0F3SUJBZ0lVU3hxVHJwWXowSS9sZjBiRGJmbFVzbjJ2dDFjd0RRWUpLb1pJaHZjTkFRRUwKQlFBd1lURUxNQWtHQTFVRUJoTUNRMDR4RVRBUEJnTlZCQWdUQ0VoaGJtZGFhRzkxTVFzd0NRWURWUVFIRXdKWQpVekVNTUFvR0ExVUVDaE1EYXpoek1ROHdEUVlEVlFRTEV3WlRlWE4wWlcweEV6QVJCZ05WQkFNVENtdDFZbVZ5CmJtVjBaWE13SGhjTk1UY3hNakF5TVRFeU9UQXdXaGNOTWpjeE1UTXdNVEV5T1RBd1dqQm5NUXN3Q1FZRFZRUUcKRXdKRFRqRVJNQThHQTFVRUNCTUlTR0Z1WjFwb2IzVXhDekFKQmdOVkJBY1RBbGhUTVJjd0ZRWURWUVFLRXc1egplWE4wWlcwNmJXRnpkR1Z5Y3pFUE1BMEdBMVVFQ3hNR1UzbHpkR1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bVNZUWkxM0EwL1RDeXhCYldyQWlGRUZ6WUNPTHZNczB2NUtCVnBsK1RTdGlObG5LRQpOd3ovZ09FOUcxTEY1dXFoMEsrUUs1Uk9TZHhmSytvUnJERlhjYXhCNTllWHczSFUxR2pmckQ1QVN2bUd1amJUCnZIWHJ2UUtCZ0Z6TVNlb0VRM2F3U09uV04zbDBxS241NDBRdzgwSFBuWk0xbEl2Vi9WcXBleXZITzRFSGJHM3AKc1hmeDVkWTBEa0ZsV01yT2g4SU1kWFBtSXJiUTUyZis1RkJkMzkyWjFxd3RkdVhYKzMzdjVaSVJjNjdkYVlkagpVYllVSjcvRFMxOG1jU0ZJcXRSQ1ZmdHpubUU2cCtXTTlvM3JJK2MvYXhSbVdCNExkTXZJCi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==

@gjmzj
Copy link
Collaborator

gjmzj commented Dec 3, 2017

@sshling 这个配置看不出问题,刚刚我自己试验了一把,AllinOne部署,然后用ansible-playbook 99.clean.yml清理了一把,cluster-info还能show出来,说明这个命令不需要去访问apiserver,只是读了./kube/config的配置,所以你的问题可能是master节点压根没起来,CentOS 7确实需要调整的,就是观察kubelet的日志 journalctl -u kubelet.service 和 kube-apiserver的日志

@gjmzj gjmzj closed this as completed Dec 4, 2017
ogre0403 pushed a commit to ogre0403/kubeasz that referenced this issue Apr 18, 2018
fix easzlab#2: Add ntp task

Closes easzlab#2

See merge request nchc-ai/kubeasz!1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants