Kubernetes next steps: Adding a node

This article describes how to add a node to the Kubernetes cluster template in the Skytap Cloud public template library.

Contents

Create a Kubernetes environment from the Skytap Cloud public template

To create the Kubernetes environment
  1. In the navigation bar, click Environments, and then click Templates.
  2. Click Skytap to display the Skytap public templates.
  3. Search for Kubernetes. If your account has access to multiple regions, you’ll see multiple copies of this template.
  4. Choose the Kubernetes 2-node cluster pre-install - Fedora 23 template in the region closest to your physical location, and then click New Environment. kubernetes template The Deploy a new environment dialog displays. deploy
  5. Click Deploy. The Kubernetes 2-node cluster pre-install environment is created.

Add a new VM to the environment

  1. Click add vms (Add VMs).

    The ADD VMS screen displays.

  2. Select the environment you just created (Kubernetes 2-node cluster pre-install - Fedora 23).
  3. Clear the checkboxes for all of the VMs except Kubernetes Node 1 - Fedora 23. select
  4. Click add vms Add VM(s). A second instance of Kubernetes Node 1 - Fedora 23 is added to the environment. second instance

Change the VM name and hostname

  1. On the VM tile of the second instance of Kubernetes Node 1 - Fedora 23, click edit name (Edit VM Name). vm properties
  2. In the Rename VM dialog, change the VM name to Kubernetes Node 3 - Fedora 23. rename
  3. Click save (Save).
  4. Click environment settings (Edit VM Settings). vm settings
  5. On the Network Adapters tab of the VM Settings page, click Edit Network Adapter. The Edit network adapter dialog displays. network adapters
  6. Change the Hostname to node-3.
  7. Click Save Changes. hostname
  8. Click back Back to Environment.

Add the new node in Kubernetes

  1. On the environment details page, click run (Run this Environment). four vms
  2. After the environment is running, click the VM tile for Kubernetes Master - Fedora 23. running
  3. Use the Skytap toolbar to login with the kubernetes user credentials.

    HTML5 Client Credentials HTML5 Client Credentials

  4. From the command line, type cd contrib/ansible/.
  5. Type vi inventory to edit the inventory, and then press i to enter insert mode.
  6. Add node-3.skytap.example. edited
  7. Press Escape, and then type :wq and press Enter to save the changes and exit vi.

Deploy

  1. Type ./setup.sh and press Enter to start the setup.
  2. When prompted to continue connecting, type yes and press Enter.
  3. Kubernetes starts up, including the newly added node-3. start
  4. To verify the deployment, type kubectl get nodes. get nodes