Skip to main content

Installing KubeCTL in Windows 10

Install Software

  1. Install Chocolatey™ using an Administrative PowerShell terminal
    1. Installing Chocolatey
  2. Install Docker-Desktop with Chocolatey™
    1. PS C:\WINDOWS\system32> choco update docker-desktop

      powershell screen after step one
  3. Install kubelogin with Chocolatey™
    1. choco update kubelogin

      Powershell window after step 3
  4. Install Kubernetes-cli (kubectl) with Chocolatey
    1. choco update Kubernetes-cli

      Powershell screen after step 4

Configure Connection

  1. Request the latest version of the PowerShell Installation script via email here. We’ll copy the script into your project’s Flux Repository.
  2. Log in to OSU Gitlab with Shibboleth and navigate to your project’s Flux Repository under repo.service.osu.edu:ContainerService/customer_flux/.
  3. Use your favorite method to clone/pull: git@repo.service.osu.edu:ContainerService/customer_flux/[your-flux-project].git
  4. Inside your local copy of the repo, find the ‘Kubernetes-CLI_Config_Generator_for_Win10x64.ps1setup script (under the base: Kubernetes_CLI) and run the script in PowerShell™.
    1. Run it in an Administrative PowerShell instance.
    2. Enter the name of the user who will be running kubectl.
    3. If multiple users will be running kubectl on the same machine, run this script once for each user.

      Powershell screen for configure connections Step 4
    4. Enter the Kubernetes Cluster Name you will be managing.

      Configuring connections step 4b

Test Connection

  1. If not already on campus, install & connect to the OSU VPN.
    1. VPN and BuckeyePass
    2. Kubernetes is restricted to on-campus IP Addresses

      VPN Connection window
  2. Launch a Windows Command Prompt (A Non-Admin Terminal)
    1. As the kubectl user, Click ÿ START, Type “cmd”, and hit Enter
    2. Issue the command, C:\> ”Program Files\Kubernetes\kubectl” version

      Step 6b Command window
    3. That looks good, let’s attempt to connect to the Kubernetes cluster

Connect

  1. Connect to the OSU VPN if not already on campus. 
    1. Kubernetes is restricted to on-campus IP Addresses

      VPN Connection window
  2. Launch a Windows Command Prompt (A Non-Admin Terminal)
    1. As the kubectl user, Click START, Type “cmd”, and hit Enter
  3. Issue the command, C:\> ”Program Files\Kubernetes\kubectl” get nodes

    Step 6b Command window
    1. That will launch a separate Shibboleth Authentication Browser window

      OSU Log in prompt
    2. Once Authenticated, minimize your browser and your terminal should now show the following 

      Connection Test Results

Help

Did something not go right? 

New-Item : NewItemIOError
At C:\users\user\Kubernetes-CLI_Config_Generator_for_Win10x64.ps1:39 char:1
+ New-Item -ItemType SymbolicLink -Path "C:\Program Files\Kubernetes\"  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceExists: (C:\Program File...-oidc-login.lnk:String) [New-Item], IOException
+ FullyQualifiedErrorId : NewItemIOError,Microsoft.PowerShell.Commands.NewItemCommand

This occurs during the ‘Connection Configuration’ stage of the installation if the Symbolic Link for oidc-login already exists.  It is safe to ignore this error.