Deploying k8s Cluster 05 with KUBEADM-Configuring KUBECTL Access Kube-apiserver

Source: Internet
Author: User
Tags k8s

Deploying k8s Cluster 05 with KUBEADM-Configuring KUBECTL Access Kube-apiserver

2018/1/4

Configuring KUBECTL Access Kube-apiserver
    • Switch master node to connect to the Apiserver of this node
    • Confirm Cluster Information
Switch master node to connect to the Apiserver of this node
 ### in order to perform kubectl on these 2 new nodes requires configuration admin.yaml[[email protected] ~]# mkdir-p ~/k8s_ Install/master/admin[[email protected] ~]# CD!$[[email protected] admin]# cp-a/etc/kubernetes/admin.conf Tvm-01.admin.conf[[email protected] admin]# sed-i ' s#10.10.9.67:6443#10.10.9.68:6443# ' tvm-01.admin.conf[[ Email protected] admin]# SCP tvm-01.admin.conf 10.10.9.68:/etc/kubernetes/admin.conf[[email protected] ~] # mkdir-p $HOME/.kube[[email protected] ~]# cp-i/etc/kubernetes/admin.conf $HOME/.kube/config### the same operation, Execute on another node: [[email protected] admin]# cp-a/etc/kubernetes/admin.conf tvm-02.admin.conf[[email protected] admin]# sed-i ' s#10.10.9.67:6443#10.10.9.69:6443# ' tvm-02.admin.conf[[email protected] admin]# SCP tvm-02.admin.conf 10.10.9.69:/etc/kubernetes/admin.conf[[email protected] ~]# mkdir-p $HOME/.kube[[email  protected] ~]# cp-i/etc/kubernetes/admin.conf $HOME/.kube/config  
Confirm Cluster Information
[[email protected] ~]# kubectl cluster-infoKubernetes master is running at https://10.10.9.68:6443KubeDNS is running at https://10.10.9.68:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxyTo further debug and diagnose cluster problems, use ‘kubectl cluster-info dump‘.[[email protected] ~]# kubectl cluster-infoKubernetes master is running at https://10.10.9.69:6443KubeDNS is running at https://10.10.9.69:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxyTo further debug and diagnose cluster problems, use ‘kubectl cluster-info dump‘.### 上述信息显示,每个节点已经连接到本机的 apiserver 上

Deploying k8s Cluster 05 with KUBEADM-Configuring KUBECTL Access Kube-apiserver

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.