help-kubesparay-tutorial

Intent
Help in bringing up a kubernetes cluster via drp-provision as presented in drp-kubespray-video (see below) and drp-kubespray-document on a drpfeature-test setup runing the RackN-Portal endpoint.
Success
Replicate drp-kubespray-video demo locally using drpcli, drp-ux and virtual-box vm’s PXE booting bare nodes to a kubeadmin cluster.

Resources

  1. kubespray-github github repo for kubespray
  2. drp-kubespray-video youtube video showing uses of kubesparay Content via RackN-Portal Content Packages
  3. drp-packet-install youtube video showing how use drp-provision on packet.net servers (not used in this tutorial)
  4. google-kubernetes-best-practices I found helpful to gain insight into kube structures

Manual Steps

  1. Assuming a drpfeature-test-network with drpfeature-test-vbox running the drpfeature-test-drpe setup.
  2. Open RackN-Portal Content Packages
    1. Click “Browse For More Content”
    2. Find kubespray and click the + icon to add this content to endpoint
    3. View your drpfeature-test-drpe Endpoint (hamburger -> Endpoint..)
    4. Click Content Packages again you should see kubespray
    5. Verify kubespray is in your endpoint, if not “Transfer” it so that it displays in the Endpoint Content column
  3. Navigate to Profiles
    1. The following locked Profiles should have been added
      1. etcd
      2. k8s-cluster
      3. k8s-deploy
      4. kube-master
      5. kube-node
    2. Clone the k8s-deploy Profile in Profiles
    3. Rename and Edit the Profile for mycluster
    4. Save and Verify Profile mycluster in Profiles
    5. In Profiles click Ansible button (on top)
    6. Select the mycluster Profile for Ansible Inventory Grid
      1. Select the server nodes you want in mycluster
      2. add etcd and kube master to kubespray1
      3. add kube node to kubespray[2..5]
  4. Show drp-kubespray-document and follow the commands step 24.1.4
    1. Git Clone kubespray-github
    2. Pull in invenotry.py from drp-inventory.py-source-file (rob shows link)
      1. Fix pointed to the wrong endpoint issue
      2. Look at what endpoint we are pointed to ./drpcli info get
      3. Set endpoint export RS_ENDPOINT=https://192.168.88.3:8092
    3. Test RS_PROFILE=mycluster ./inventory.py | jq command
    4. Test Ansible via ping ansible all -i inventory.py -m ping
    5. Deploy the k8s cluster with kubespray ansible-playbook -i inventory.py cluster.yml
  5. check the kubernetes api on master node https://192.168.88.100:6443 (kube changeme)

Video Track

  1. tc20 Show kubespray-github repo
  2. tc55 Show packet.net servers and refer to drp-packet-install video
  3. tc80 Show RackN-Portal endpoint Machines
  4. tc97 Navigate to Content Packages
    1. tc106 Find kubespray Content
    2. tc110 Transfer kubespray Content to Endpoint Content
  5. tc120 Navigate to Profiles
    1. tc123 The following locked Profiles should have been added
      1. etcd
      2. k8s-cluster
      3. k8s-deploy
      4. kube-master
      5. kube-node
    2. tc170 Clone the k8s-deploy Profile in Profiles
    3. tc219 Rename and Edit the Profile for mycluster
    4. tc242 Save and Verify Profile mycluster in Profiles
    5. tc253 In Profiles click Ansible button (on top)
    6. tc260 Select the mycluster Profile for Ansible Inventory Grid
      1. tc303 Select the server nodes you want in mycluster
      2. tc303 add etcd and kube master to kubespray1
      3. tc310 add kube node to kubespray[2..5]
  6. tc333 Show drp-kubespray-document and follow the commands step 24.1.4
    1. tc373 Git Clone kubespray-github
    2. tc373 Pull in invenotry.py from drp-inventory.py-source-file (rob shows link)
      1. tc387 Fix pointed to the wrong endpoint issue
      2. tc433 Look at what endpoint we are pointed to ./drpcli info get
      3. tc473 Set endpoint export RS_ENDPOINT=https://147.75.77.95:8092
    3. tc509 Test RS_PROFILE=mycluster ./inventory.py | jq command
    4. tc600 Test Ansible via ping ansible all -i inventory.py -m ping
    5. tc641 Deploy the k8s cluster with kubespray ansible-playbook -i inventory.py cluster.yml
  7. tc771 check the kubernetes api on master node https://147.75.106.45:6443 (kube changeme)

Video

Setup for testing drp endpoint

drpfeature-test setup uses the drpfeature-test-network and drpfeature-test-vbox running on a drpfeature-test-macosx with drp-provision running on the drpfeature-test-drpe endpoint for pxe boot of Proliant Blade servers in drpfeature-test-hpeC7000 configuration which then are assessable via drpfeature-test-drpe-ansible and can use drpfeature-test-drpe-ansible-blender to install a blender render grid worker node.