Kubernetes next steps: Adding a node
This article describes how to add a node to the Kubernetes cluster template in the Skytap public template library.
Contents
Create a Kubernetes environment from the Skytap public template
To create the Kubernetes environment
- In the navigation bar, click Environments, and then click Templates.
- Click Skytap to display the Skytap public templates.
- Search for Kubernetes. If your account has access to multiple regions, you’ll see multiple copies of this template.
-
Choose the Kubernetes 2-node cluster pre-install - Fedora 23 template in the region closest to your physical location, and then click New Environment.
The Deploy a new environment dialog displays.
- Click Deploy. The Kubernetes 2-node cluster pre-install environment is created.
Add a new VM to the environment
-
Click
(Add VMs).
The ADD VMS screen displays.
- Select the environment you just created (Kubernetes 2-node cluster pre-install - Fedora 23).
-
Clear the checkboxes for all of the VMs except Kubernetes Node 1 - Fedora 23.
-
Click
Add VM(s). A second instance of Kubernetes Node 1 - Fedora 23 is added to the environment.
Change the VM name and hostname
-
On the VM tile of the second instance of Kubernetes Node 1 - Fedora 23, click
(Edit VM Name).
-
In the Rename VM dialog, change the VM name to Kubernetes Node 3 - Fedora 23.
- Click
(Save).
-
Click
(Edit VM Settings).
-
On the Network Adapters tab of the VM Settings page, click Edit Network Adapter. The Edit network adapter dialog displays.
- Change the Hostname to node-3.
-
Click Save Changes.
- Click
Back to Environment.
Add the new node in Kubernetes
-
On the environment details page, click
(Run this Environment).
-
After the environment is running, click the VM tile for Kubernetes Master - Fedora 23.
-
Use the Skytap toolbar to login with the
kubernetes
user credentials. - From the command line, type
cd contrib/ansible/
. - Type
vi inventory
to edit the inventory, and then pressi
to enter insert mode. -
Add node-3.skytap.example.
- Press Escape, and then type
:wq
and press Enter to save the changes and exit vi.
Deploy
- Type
./setup.sh
and press Enter to start the setup. - When prompted to continue connecting, type yes and press Enter.
-
Kubernetes starts up, including the newly added node-3.
-
To verify the deployment, type
kubectl get nodes
.