Run the following commands from the machine which will be your Kubernetes Client
wget https://storage.googleapis.com/kubernetes-release/release/v1.7.6/bin/darwin/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin
wget https://storage.googleapis.com/kubernetes-release/release/v1.7.6/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin
Note: On CoreOS the above directory is read only, therefore you might want to use a different path.
sudo mkdir -p /opt/bin/
sudo mv kubectl /opt/bin/
export PATH=$PATH:/opt/bin
In this section you will configure the kubectl client to point to the Kubernetes API Server Frontend Load Balancer.
Use the load balancer's floating ip from earlier:
export KUBERNETES_PUBLIC_ADDRESS=10.47.40.33
Also be sure to locate the CA certificate created earlier. Since we are using self-signed TLS certs we need to trust the CA certificate so we can verify the remote API Servers.
The following commands will build up the default kubeconfig file used by kubectl.
kubectl config set-cluster kubernetes-the-hard-way \
--certificate-authority=ca.pem \
--embed-certs=true \
--server=https://${KUBERNETES_PUBLIC_ADDRESS}
kubectl config set-credentials admin \
--embed-certs=true \
--client-certificate=admin.pem \
--client-key=admin-key.pem
kubectl config set-context kubernetes-the-hard-way \
--cluster=kubernetes-the-hard-way \
--user=admin
kubectl config use-context kubernetes-the-hard-way
Once you have created the master nodes, you should be able to connect securly to the remote API server.