Skip to main content

Command Palette

Search for a command to run...

Duplo-JIT + Lens Setup and Usage Guide

Published
3 min read

For Windows and macOS


🧩 What is Duplo-JIT?

duplo-jit (Just-In-Time access) is a CLI tool that:

  • Authenticates you temporarily with Duplo.

  • Generates a short-lived kubeconfig so you can securely connect to your Duplo-managed Kubernetes cluster.


⚙️ Installation Guide

🪟 For Windows

  1. Download binaries from:
    🔗 https://github.com/duplocloud/duplo-jit/releases

  2. Create a folder for Duplo-JIT:

     mkdir "C:\Program Files\duplo-jit"
    
  3. Move binaries to the folder:

     move C:\Users\<you>\Downloads\duplo-jit.exe "C:\Program Files\duplo-jit\"
     move C:\Users\<you>\Downloads\duplo-aws-credential-process.exe "C:\Program Files\duplo-jit\"
    
  4. Add the folder to your PATH:

     setx PATH "$($env:PATH);C:\Program Files\duplo-jit"
    
  5. Or add it manually via GUI:

    • Search “Environment Variables” in Windows.

    • Click Edit the system environment variables → Environment Variables…

    • Under System variables, select Path → click Edit → New → add:

        C:\Program Files\duplo-jit
      
    • Click OK → OK → OK.

    • Restart PowerShell.

  6. Verify:

     duplo-jit --version
    

✅ Example Output:

duplo-jit.exe version 0.5.11 (git commit 0818367...)

🍎 For macOS

  1. Download the macOS binary (duplo-jit_0.x.x_darwin_amd64.tar.gz or arm64 for M1/M2 Macs) from:
    🔗 https://github.com/duplocloud/duplo-jit/releases

  2. Extract it:

     tar -xvzf duplo-jit_0.5.11_darwin_amd64.tar.gz
    
  3. Move it to a system path:

     sudo mv duplo-jit /usr/local/bin/
     sudo mv duplo-aws-credential-process /usr/local/bin/
    
  4. Make sure both are executable:

     chmod +x /usr/local/bin/duplo-jit
     chmod +x /usr/local/bin/duplo-aws-credential-process
    
  5. Verify installation:

     duplo-jit --version
    

✅ Example Output:

duplo-jit version 0.5.11 (git commit 0818367...)

🔐 Authenticate and Generate Kubeconfig

  1. Login to Duplo:

     duplo-jit login
    

    This will open a browser window for authentication.

  2. Fetch kubeconfig for your tenant (replace <tenant-name>):

     duplo-jit kubeconfig get <tenant-name>
    
  3. This generates a file like:

     ~/Downloads/duploinfra-ense-use2-kubeconfig.yaml
    

💻 Connect to Your Cluster

Temporary connection:

kubectl get nodes --kubeconfig ~/Downloads/duploinfra-ense-use2-kubeconfig.yaml

Set as your default kubeconfig:

Windows:

setx KUBECONFIG "C:\Users\<you>\Downloads\duploinfra-ense-use2-kubeconfig.yaml"

macOS:

export KUBECONFIG=~/Downloads/duploinfra-ense-use2-kubeconfig.yaml

Then test:

kubectl get nodes

🧰 Using Lens (Kubernetes IDE)

  1. Open Lens.

  2. Go to Catalog → Clusters → Add Cluster.

  3. Choose Add from kubeconfig.

  4. Browse to and select your Duplo kubeconfig file.

  5. Once added, click the cluster to connect.

⚠️ When access expires (usually after a few hours):

duplo-jit kubeconfig get <tenant-name>

Then reload the cluster in Lens.


🧭 Working with Multiple Clusters (e.g., Duplo + Minikube)

If you want to use Duplo and Minikube together:

  1. Merge your kubeconfigs:

     export KUBECONFIG=~/.kube/config:~/Downloads/duploinfra-ense-use2-kubeconfig.yaml
     kubectl config view --merge --flatten > ~/.kube/config-merged
     mv ~/.kube/config-merged ~/.kube/config
    
  2. Verify contexts:

     kubectl config get-contexts
    
  3. Switch between clusters:

     kubectl config use-context <context-name>
    
  4. Lens will automatically detect both clusters.


⏳ When Duplo-JIT Access Expires

If you see an authentication error like:

Error while proxying request: exec: executable duplo-jit not found

Run:

duplo-jit kubectl

This re-authenticates and refreshes your kubeconfig.


⚠️ Common Errors and Fixes

Error:

exec: executable duplo-jit not found

Cause: Duplo-JIT not in PATH.

Fix:

  • Verify installation directory is in PATH.

  • Restart terminal or Lens.


You’re all set!
You can now:

  • Use kubectl normally with your Duplo-managed cluster.

  • Connect and manage clusters via Lens.

  • Re-authenticate easily when access expires.

  • Merge clusters like Minikube + Duplo for multi-cluster management.