Little helper to run CNCF's k3s in Docker
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
k3d/v5.0.1/index.html

1394 lines
42 KiB

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="Little helper to run Rancher Lab's k3s in Docker">
<link rel="canonical" href="https://k3d.io/v5.0.1/">
<link rel="icon" href="static/img/favicons_black_blue/favicon.png">
<meta name="generator" content="mkdocs-1.2.2, mkdocs-material-7.2.6">
<title>k3d</title>
<link rel="stylesheet" href="assets/stylesheets/main.802231af.min.css">
<link rel="stylesheet" href="assets/stylesheets/palette.3f5d1f46.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
<style>:root{--md-text-font-family:"Roboto";--md-code-font-family:"Roboto Mono"}</style>
<link rel="stylesheet" href="static/css/asciinema-player.css">
<link rel="stylesheet" href="static/css/extra.css">
</head>
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="black" data-md-color-accent="grey">
<script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
<script>var palette=__get("__palette");if(null!==palette&&"object"==typeof palette.color)for(var key in palette.color)document.body.setAttribute("data-md-color-"+key,palette.color[key])</script>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#overview" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<header class="md-header" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="." title="k3d" class="md-header__button md-logo" aria-label="k3d" data-md-component="logo">
<img src="static/img/k3d_logo_black_green.svg" alt="logo">
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
k3d
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Overview
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="black" data-md-color-accent="grey" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 10a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2 2 2 0 0 1 2-2m10-3a5 5 0 0 1 5 5 5 5 0 0 1-5 5H7a5 5 0 0 1-5-5 5 5 0 0 1 5-5h10M7 9a3 3 0 0 0-3 3 3 3 0 0 0 3 3h10a3 3 0 0 0 3-3 3 3 0 0 0-3-3H7z"/></svg>
</label>
<input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="light-blue" data-md-color-accent="" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_2">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 7H7a5 5 0 0 0-5 5 5 5 0 0 0 5 5h10a5 5 0 0 0 5-5 5 5 0 0 0-5-5m0 8a3 3 0 0 1-3-3 3 3 0 0 1 3-3 3 3 0 0 1 3 3 3 3 0 0 1-3 3z"/></svg>
</label>
</form>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
</button>
</nav>
<div class="md-search__suggest" data-md-component="search-suggest"></div>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://github.com/rancher/k3d/" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
</div>
<div class="md-source__repository">
rancher/k3d
</div>
</a>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
<div class="md-tabs__inner md-grid">
<ul class="md-tabs__list">
<li class="md-tabs__item">
<a href="." class="md-tabs__link md-tabs__link--active">
Overview
</a>
</li>
<li class="md-tabs__item">
<a href="usage/configfile/" class="md-tabs__link">
Guides
</a>
</li>
<li class="md-tabs__item">
<a href="design/project/" class="md-tabs__link">
Design
</a>
</li>
<li class="md-tabs__item">
<a href="faq/faq/" class="md-tabs__link">
FAQ
</a>
</li>
</ul>
</div>
</nav>
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="." title="k3d" class="md-nav__button md-logo" aria-label="k3d" data-md-component="logo">
<img src="static/img/k3d_logo_black_green.svg" alt="logo">
</a>
k3d
</label>
<div class="md-nav__source">
<a href="https://github.com/rancher/k3d/" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
</div>
<div class="md-source__repository">
rancher/k3d
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
Overview
<span class="md-nav__icon md-icon"></span>
</label>
<a href="." class="md-nav__link md-nav__link--active">
Overview
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#what-is-k3d" class="md-nav__link">
What is k3d?
</a>
</li>
<li class="md-nav__item">
<a href="#learning" class="md-nav__link">
Learning
</a>
</li>
<li class="md-nav__item">
<a href="#requirements" class="md-nav__link">
Requirements
</a>
</li>
<li class="md-nav__item">
<a href="#releases" class="md-nav__link">
Releases
</a>
</li>
<li class="md-nav__item">
<a href="#installation" class="md-nav__link">
Installation
</a>
<nav class="md-nav" aria-label="Installation">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#install-script" class="md-nav__link">
Install Script
</a>
<nav class="md-nav" aria-label=" Install Script">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#install-current-latest-release" class="md-nav__link">
Install current latest release
</a>
</li>
<li class="md-nav__item">
<a href="#install-specific-release" class="md-nav__link">
Install specific release
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#other-installers" class="md-nav__link">
Other Installers
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#quick-start" class="md-nav__link">
Quick Start
</a>
</li>
<li class="md-nav__item">
<a href="#related-projects" class="md-nav__link">
Related Projects
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_2" data-md-state="indeterminate" type="checkbox" id="__nav_2" checked>
<label class="md-nav__link" for="__nav_2">
Guides
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="Guides" data-md-level="1">
<label class="md-nav__title" for="__nav_2">
<span class="md-nav__icon md-icon"></span>
Guides
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="usage/configfile/" class="md-nav__link">
Using Config Files
</a>
</li>
<li class="md-nav__item">
<a href="usage/kubeconfig/" class="md-nav__link">
Handling Kubeconfigs
</a>
</li>
<li class="md-nav__item">
<a href="usage/multiserver/" class="md-nav__link">
Creating multi-server clusters
</a>
</li>
<li class="md-nav__item">
<a href="usage/registries/" class="md-nav__link">
Using Image Registries
</a>
</li>
<li class="md-nav__item">
<a href="usage/exposing_services/" class="md-nav__link">
Exposing Services
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_2_6" data-md-state="indeterminate" type="checkbox" id="__nav_2_6" checked>
<label class="md-nav__link" for="__nav_2_6">
Advanced Guides
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="Advanced Guides" data-md-level="2">
<label class="md-nav__title" for="__nav_2_6">
<span class="md-nav__icon md-icon"></span>
Advanced Guides
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="usage/advanced/calico/" class="md-nav__link">
Use Calico instead of Flannel
</a>
</li>
<li class="md-nav__item">
<a href="usage/advanced/cuda/" class="md-nav__link">
Running CUDA workloads
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_2_7" data-md-state="indeterminate" type="checkbox" id="__nav_2_7" checked>
<label class="md-nav__link" for="__nav_2_7">
Commands
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="Commands" data-md-level="2">
<label class="md-nav__title" for="__nav_2_7">
<span class="md-nav__icon md-icon"></span>
Commands
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="usage/commands/k3d/" class="md-nav__link">
K3d
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_cluster/" class="md-nav__link">
K3d cluster
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_cluster_create/" class="md-nav__link">
K3d cluster create
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_cluster_delete/" class="md-nav__link">
K3d cluster delete
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_cluster_edit/" class="md-nav__link">
K3d cluster edit
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_cluster_list/" class="md-nav__link">
K3d cluster list
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_cluster_start/" class="md-nav__link">
K3d cluster start
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_cluster_stop/" class="md-nav__link">
K3d cluster stop
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_completion/" class="md-nav__link">
K3d completion
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_config/" class="md-nav__link">
K3d config
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_config_init/" class="md-nav__link">
K3d config init
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_config_migrate/" class="md-nav__link">
K3d config migrate
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_image/" class="md-nav__link">
K3d image
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_image_import/" class="md-nav__link">
K3d image import
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_kubeconfig/" class="md-nav__link">
K3d kubeconfig
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_kubeconfig_get/" class="md-nav__link">
K3d kubeconfig get
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_kubeconfig_merge/" class="md-nav__link">
K3d kubeconfig merge
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_node/" class="md-nav__link">
K3d node
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_node_create/" class="md-nav__link">
K3d node create
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_node_delete/" class="md-nav__link">
K3d node delete
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_node_edit/" class="md-nav__link">
K3d node edit
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_node_list/" class="md-nav__link">
K3d node list
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_node_start/" class="md-nav__link">
K3d node start
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_node_stop/" class="md-nav__link">
K3d node stop
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_registry/" class="md-nav__link">
K3d registry
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_registry_create/" class="md-nav__link">
K3d registry create
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_registry_delete/" class="md-nav__link">
K3d registry delete
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_registry_list/" class="md-nav__link">
K3d registry list
</a>
</li>
<li class="md-nav__item">
<a href="usage/commands/k3d_version/" class="md-nav__link">
K3d version
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" data-md-state="indeterminate" type="checkbox" id="__nav_3" checked>
<label class="md-nav__link" for="__nav_3">
Design
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="Design" data-md-level="1">
<label class="md-nav__title" for="__nav_3">
<span class="md-nav__icon md-icon"></span>
Design
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="design/project/" class="md-nav__link">
Project Overview
</a>
</li>
<li class="md-nav__item">
<a href="design/defaults/" class="md-nav__link">
Defaults
</a>
</li>
<li class="md-nav__item">
<a href="design/networking/" class="md-nav__link">
Networking
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="faq/faq/" class="md-nav__link">
FAQ
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#what-is-k3d" class="md-nav__link">
What is k3d?
</a>
</li>
<li class="md-nav__item">
<a href="#learning" class="md-nav__link">
Learning
</a>
</li>
<li class="md-nav__item">
<a href="#requirements" class="md-nav__link">
Requirements
</a>
</li>
<li class="md-nav__item">
<a href="#releases" class="md-nav__link">
Releases
</a>
</li>
<li class="md-nav__item">
<a href="#installation" class="md-nav__link">
Installation
</a>
<nav class="md-nav" aria-label="Installation">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#install-script" class="md-nav__link">
Install Script
</a>
<nav class="md-nav" aria-label=" Install Script">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#install-current-latest-release" class="md-nav__link">
Install current latest release
</a>
</li>
<li class="md-nav__item">
<a href="#install-specific-release" class="md-nav__link">
Install specific release
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#other-installers" class="md-nav__link">
Other Installers
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#quick-start" class="md-nav__link">
Quick Start
</a>
</li>
<li class="md-nav__item">
<a href="#related-projects" class="md-nav__link">
Related Projects
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<a href="https://github.com/rancher/k3d/edit/main/docs/index.md" title="Edit this page" class="md-content__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>
</a>
<h1 id="overview">Overview<a class="headerlink" href="#overview" title="Permanent link">&para;</a></h1>
<p><img alt="k3d" src="static/img/k3d_logo_black_blue.svg" /></p>
<h2 id="what-is-k3d">What is k3d?<a class="headerlink" href="#what-is-k3d" title="Permanent link">&para;</a></h2>
<p>k3d is a lightweight wrapper to run <a href="https://github.com/rancher/k3s">k3s</a> (Rancher Lab&rsquo;s minimal Kubernetes distribution) in docker.</p>
<p>k3d makes it very easy to create single- and multi-node <a href="https://github.com/rancher/k3s">k3s</a> clusters in docker, e.g. for local development on Kubernetes.</p>
<p><strong>Note:</strong> k3d is a <strong>community-driven project</strong>, that is supported by Rancher (SUSE) and it&rsquo;s not an official Rancher (SUSE) project.</p>
<details class="tip"><summary>View a quick demo</summary><p><asciinema-player src="/static/asciicast/20210917_k3d_v5.0.0_01.cast" cols=200 rows=32></asciinema-player></p>
</details>
<h2 id="learning">Learning<a class="headerlink" href="#learning" title="Permanent link">&para;</a></h2>
<div class="admonition tip">
<p class="admonition-title">k3d demo repository: <a href="https://github.com/iwilltry42/k3d-demo">iwilltry42/k3d-demo</a></p>
<p>Featured use-cases include:</p>
<ul>
<li><strong>hot-reloading</strong> of code when developing on k3d (Python Flask App)</li>
<li>build-deploy-test cycle using <strong>Tilt</strong></li>
<li>full cluster lifecycle for simple and <strong>multi-server</strong> clusters</li>
<li>Proof of Concept of using k3d as a service in <strong>Drone CI</strong></li>
</ul>
</div>
<ul>
<li><a href="https://www.youtube.com/watch?v=hMr3prm9gDM">Rancher Meetup - May 2020 - Simplifying Your Cloud-Native Development Workflow With K3s, K3c and K3d (YouTube)</a></li>
</ul>
<h2 id="requirements">Requirements<a class="headerlink" href="#requirements" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="https://docs.docker.com/install/"><strong>docker</strong></a> to be able to use k3d at all</li>
<li><a href="https://kubernetes.io/docs/tasks/tools/#kubectl">kubectl</a> to interact with the Kubernetes cluster</li>
</ul>
<h2 id="releases">Releases<a class="headerlink" href="#releases" title="Permanent link">&para;</a></h2>
<table>
<thead>
<tr>
<th>Platform</th>
<th>Stage</th>
<th>Version</th>
<th>Release Date</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://github.com/rancher/k3d/releases"><strong>GitHub Releases</strong></a></td>
<td>stable</td>
<td><a href="https://github.com/rancher/k3d/releases/latest"><img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/rancher/k3d?label=%20&amp;style=for-the-badge&amp;logo=github" /></a></td>
<td><a href="https://github.com/rancher/k3d/releases/latest"><img alt="GitHub Release Date" src="https://img.shields.io/github/release-date/rancher/k3d?label=%20&amp;style=for-the-badge" /></a></td>
<td></td>
</tr>
<tr>
<td><a href="https://github.com/rancher/k3d/releases"><strong>GitHub Releases</strong></a></td>
<td>latest</td>
<td><a href="https://github.com/rancher/k3d/releases"><img alt="GitHub release (latest by date including pre-releases)" src="https://img.shields.io/github/v/release/rancher/k3d?include_prereleases&amp;label=%20&amp;style=for-the-badge&amp;logo=github" /></a></td>
<td><a href="https://github.com/rancher/k3d/releases"><img alt="GitHub (Pre-)Release Date" src="https://img.shields.io/github/release-date-pre/rancher/k3d?label=%20&amp;style=for-the-badge" /></a></td>
<td></td>
</tr>
<tr>
<td><a href="https://formulae.brew.sh/formula/k3d"><strong>Homebrew</strong></a></td>
<td>-</td>
<td><a href="https://formulae.brew.sh/formula/k3d"><img alt="homebrew" src="https://img.shields.io/homebrew/v/k3d?label=%20&amp;style=for-the-badge" /></a></td>
<td>-</td>
<td></td>
</tr>
<tr>
<td><a href="https://chocolatey.org/packages/k3d/"><strong>Chocolatey</strong></a></td>
<td>stable</td>
<td><a href="https://chocolatey.org/packages/k3d/"><img alt="chocolatey" src="https://img.shields.io/chocolatey/v/k3d?label=%20&amp;style=for-the-badge" /></a></td>
<td>-</td>
<td></td>
</tr>
</tbody>
</table>
<h2 id="installation">Installation<a class="headerlink" href="#installation" title="Permanent link">&para;</a></h2>
<p>You have several options there:</p>
<h3 id="install-script"><a href="https://raw.githubusercontent.com/rancher/k3d/main/install.sh"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="m149.9 349.1-.2-.2-32.8-28.9 32.8-28.9c3.6-3.2 4-8.8.8-12.4l-.2-.2-17.4-18.6c-3.4-3.6-9-3.7-12.4-.4l-57.7 54.1c-3.7 3.5-3.7 9.4 0 12.8l57.7 54.1c1.6 1.5 3.8 2.4 6 2.4 2.4 0 4.8-1 6.4-2.8l17.4-18.6c3.3-3.5 3.1-9.1-.4-12.4zm220-251.2L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM256 51.9l76.1 76.1H256zM336 464H48V48h160v104c0 13.3 10.7 24 24 24h104zM209.6 214c-4.7-1.4-9.5 1.3-10.9 6L144 408.1c-1.4 4.7 1.3 9.6 6 10.9l24.4 7.1c4.7 1.4 9.6-1.4 10.9-6L240 231.9c1.4-4.7-1.3-9.6-6-10.9zm24.5 76.9.2.2 32.8 28.9-32.8 28.9c-3.6 3.2-4 8.8-.8 12.4l.2.2 17.4 18.6c3.3 3.5 8.9 3.7 12.4.4l57.7-54.1c3.7-3.5 3.7-9.4 0-12.8l-57.7-54.1c-3.5-3.3-9.1-3.2-12.4.4l-17.4 18.6c-3.3 3.5-3.1 9.1.4 12.4z"/></svg></span> Install Script</a><a class="headerlink" href="#install-script" title="Permanent link">&para;</a></h3>
<h4 id="install-current-latest-release">Install current latest release<a class="headerlink" href="#install-current-latest-release" title="Permanent link">&para;</a></h4>
<ul>
<li>wget: <code class="highlight">wget -q -O - https://raw.githubusercontent.com/rancher/k3d/main/install.sh <span class="p">|</span> bash</code></li>
<li>curl: <code class="highlight">curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh <span class="p">|</span> bash</code></li>
</ul>
<h4 id="install-specific-release">Install specific release<a class="headerlink" href="#install-specific-release" title="Permanent link">&para;</a></h4>
<p>Use the install script to grab a specific release (via <code>TAG</code> environment variable):</p>
<ul>
<li>wget: <code class="highlight">wget -q -O - https://raw.githubusercontent.com/rancher/k3d/main/install.sh <span class="p">|</span> <span class="nv">TAG</span><span class="o">=</span>v5.0.0 bash</code></li>
<li>curl: <code class="highlight">curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh <span class="p">|</span> <span class="nv">TAG</span><span class="o">=</span>v5.0.0 bash</code></li>
</ul>
<h3 id="other-installers">Other Installers<a class="headerlink" href="#other-installers" title="Permanent link">&para;</a></h3>
<details class="tip"><summary>Other Installation Methods</summary><ul>
<li>
<p><a href="https://brew.sh"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M368 96h-48V56c0-13.255-10.745-24-24-24H24C10.745 32 0 42.745 0 56v400c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24v-42.11l80.606-35.977C429.396 365.063 448 336.388 448 304.86V176c0-44.112-35.888-80-80-80zm16 208.86a16.018 16.018 0 0 1-9.479 14.611L320 343.805V160h48c8.822 0 16 7.178 16 16v128.86zM208 384c-8.836 0-16-7.164-16-16V144c0-8.836 7.164-16 16-16s16 7.164 16 16v224c0 8.836-7.164 16-16 16zm-96 0c-8.836 0-16-7.164-16-16V144c0-8.836 7.164-16 16-16s16 7.164 16 16v224c0 8.836-7.164 16-16 16z"/></svg></span> Homebrew (MacOS/Linux)</a>: <code class="highlight">brew install k3d</code></p>
<p><em>Note</em>: The formula can be found in <a href="https://github.com/Homebrew/homebrew-core/blob/master/Formula/k3d.rb">homebrew/homebrew-core</a> and is mirrored to <a href="https://github.com/Homebrew/linuxbrew-core/blob/master/Formula/k3d.rb">homebrew/linuxbrew-core</a></p>
</li>
</ul>
<ul>
<li>
<p><a href="https://aur.archlinux.org/"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c-.89 2.18-1.43 3.61-2.42 5.73.61.64 1.35 1.39 2.56 2.24-1.3-.54-2.19-1.07-2.85-1.63C8 11 6.03 14.75 2 22c3.17-1.83 5.63-2.96 7.92-3.39-.1-.42-.16-.88-.15-1.36v-.1c.05-2.03 1.11-3.59 2.36-3.48 1.25.1 2.22 1.83 2.17 3.87-.01.38-.05.75-.12 1.09 2.26.44 4.69 1.56 7.82 3.37-.62-1.14-1.17-2.16-1.69-3.13-.81-.64-1.7-1.48-3.46-2.37 1.21.3 2.08.66 2.76 1.07C14.26 7.62 13.83 6.3 12 2z"/></svg></span> AUR (Arch Linux User Repository)</a>: <code class="highlight">yay -S rancher-k3d-bin</code></p>
<p>Package <a href="https://aur.archlinux.org/packages/rancher-k3d-bin/">rancher-k3d-bin</a></p>
</li>
</ul>
<ul>
<li>
<p><a href="https://github.com/rancher/k3d/releases"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34-.46-1.16-1.11-1.47-1.11-1.47-.91-.62.07-.6.07-.6 1 .07 1.53 1.03 1.53 1.03.87 1.52 2.34 1.07 2.91.83.09-.65.35-1.09.63-1.34-2.22-.25-4.55-1.11-4.55-4.92 0-1.11.38-2 1.03-2.71-.1-.25-.45-1.29.1-2.64 0 0 .84-.27 2.75 1.02.79-.22 1.65-.33 2.5-.33.85 0 1.71.11 2.5.33 1.91-1.29 2.75-1.02 2.75-1.02.55 1.35.2 2.39.1 2.64.65.71 1.03 1.6 1.03 2.71 0 3.82-2.34 4.66-4.57 4.91.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2z"/></svg></span> Download GitHub Release</a></p>
<p>Grab a release binary from the <a href="https://github.com/rancher/k3d/releases">release tab</a> and install it yourself</p>
</li>
</ul>
<ul>
<li>
<p><a href="https://chocolatey.org/"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 12V6.75l6-1.32v6.48L3 12m17-9v8.75l-10 .15V5.21L20 3M3 13l6 .09v6.81l-6-1.15V13m17 .25V22l-10-1.91V13.1l10 .15z"/></svg></span> Chocolatey (Windows)</a>: <code>choco install k3d</code></p>
<p><em>Note</em>: package source can be found in <a href="https://github.com/erwinkersten/chocolatey-packages/tree/master/automatic/k3d">erwinkersten/chocolatey-packages</a></p>
</li>
</ul>
<ul>
<li><a href="https://github.com/alexellis/arkade">arkade</a>: <code>arkade get k3d</code></li>
</ul>
<ul>
<li>
<p><a href="https://asdf-vm.com">asdf</a>: <code>asdf plugin-add k3d &amp;&amp; asdf install k3d latest</code></p>
<p><em>Note</em>: <code>asdf plugin-add k3d</code>, then <code>asdf install k3d &lt;tag&gt;</code> with <code>&lt;tag&gt; = latest</code> or <code>5.x.x</code> for a specific version (maintained by <a href="https://github.com/spencergilbert/asdf-k3d">spencergilbert/asdf-k3d</a>)</p>
</li>
</ul>
<ul>
<li>Others<ul>
<li>install via go: <code class="highlight">go install github.com/rancher/k3d@latest</code> (<strong>Note</strong>: this will give you unreleased/bleeding-edge changes)</li>
</ul>
</li>
</ul>
</details>
<h2 id="quick-start">Quick Start<a class="headerlink" href="#quick-start" title="Permanent link">&para;</a></h2>
<p>Create a cluster named <code>mycluster</code> with just a single server node:</p>
<div class="highlight"><pre><span></span><code>k3d cluster create mycluster
</code></pre></div>
<p>Use the new cluster with <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/"><code>kubectl</code></a>, e.g.:</p>
<div class="highlight"><pre><span></span><code>kubectl get nodes
</code></pre></div>
<details class="note"><summary>Getting the cluster&rsquo;s kubeconfig (included in <code>k3d cluster create</code>)</summary><p>Get the new cluster&rsquo;s connection details merged into your default kubeconfig (usually specified using the <code>KUBECONFIG</code> environment variable or the default path <code class="highlight"><span class="nv">$HOME</span>/.kube/config</code>) and directly switch to the new context:</p>
<div class="highlight"><pre><span></span><code>k3d kubeconfig merge mycluster --kubeconfig-switch-context
</code></pre></div>
</details>
<h2 id="related-projects">Related Projects<a class="headerlink" href="#related-projects" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="https://github.com/inercia/vscode-k3d/">vscode-k3d</a>: VSCode Extension to handle k3d clusters from within VSCode</li>
<li><a href="https://github.com/inercia/k3x">k3x</a>: a graphics interface (for Linux) to k3d.</li>
<li><a href="https://github.com/AbsaOSS/k3d-action">AbsaOSS/k3d-action</a>: fully customizable GitHub Action to run lightweight Kubernetes clusters.</li>
<li><a href="https://github.com/cnrancher/autok3s">AutoK3s</a>: a lightweight tool to help run K3s everywhere including k3d provider.</li>
<li><a href="https://github.com/nolar/setup-k3d-k3s">nolar/setup-k3d-k3s</a>: setup K3d/K3s for GitHub Actions.</li>
</ul>
<hr>
<div class="md-source-date">
<small>
Last update: <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">September 17, 2021</span>
</small>
</div>
</article>
</div>
</div>
<a href="#" class="md-top md-icon" data-md-component="top" data-md-state="hidden">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"/></svg>
Back to top
</a>
</main>
<footer class="md-footer">
<nav class="md-footer__inner md-grid" aria-label="Footer">
<a href="usage/configfile/" class="md-footer__link md-footer__link--next" aria-label="Next: Using Config Files" rel="next">
<div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction">
Next
</span>
Using Config Files
</div>
</div>
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
</div>
</a>
</nav>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
<div class="md-footer-copyright__highlight">
Copyright &copy; 2020-2021 k3d Authors
</div>
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": ".", "features": ["navigation.top", "search.suggest", "search.highlight", "navigation.expand", "navigation.tabs"], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.409db549.min.js", "version": {"provider": "mike"}}</script>
<script src="assets/javascripts/bundle.756773cc.min.js"></script>
<script src="static/js/asciinema-player.js"></script>
</body>
</html>