mirror of https://github.com/k3d-io/k3d
commit 3d1a670790
Author: Thorsten Klein <iwilltry42@gmail.com> Date: Fri Mar 12 08:22:05 2021 +0100 [Enhancement] docs: add page about the config file (#534)pull/667/head
parent
5cd596b75e
commit
158b091b2d
File diff suppressed because one or more lines are too long
@ -1,51 +1,55 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url> |
||||
<loc>https://k3d.io/</loc> |
||||
<lastmod>2021-03-11</lastmod> |
||||
<lastmod>2021-03-12</lastmod> |
||||
<changefreq>daily</changefreq> |
||||
</url><url> |
||||
<loc>https://k3d.io/usage/commands/</loc> |
||||
<lastmod>2021-03-11</lastmod> |
||||
<lastmod>2021-03-12</lastmod> |
||||
<changefreq>daily</changefreq> |
||||
</url><url> |
||||
<loc>https://k3d.io/usage/configfile/</loc> |
||||
<lastmod>2021-03-12</lastmod> |
||||
<changefreq>daily</changefreq> |
||||
</url><url> |
||||
<loc>https://k3d.io/usage/kubeconfig/</loc> |
||||
<lastmod>2021-03-11</lastmod> |
||||
<lastmod>2021-03-12</lastmod> |
||||
<changefreq>daily</changefreq> |
||||
</url><url> |
||||
<loc>https://k3d.io/usage/multiserver/</loc> |
||||
<lastmod>2021-03-11</lastmod> |
||||
<lastmod>2021-03-12</lastmod> |
||||
<changefreq>daily</changefreq> |
||||
</url><url> |
||||
<loc>https://k3d.io/usage/guides/exposing_services/</loc> |
||||
<lastmod>2021-03-11</lastmod> |
||||
<lastmod>2021-03-12</lastmod> |
||||
<changefreq>daily</changefreq> |
||||
</url><url> |
||||
<loc>https://k3d.io/usage/guides/registries/</loc> |
||||
<lastmod>2021-03-11</lastmod> |
||||
<lastmod>2021-03-12</lastmod> |
||||
<changefreq>daily</changefreq> |
||||
</url><url> |
||||
<loc>https://k3d.io/usage/guides/calico/</loc> |
||||
<lastmod>2021-03-11</lastmod> |
||||
<lastmod>2021-03-12</lastmod> |
||||
<changefreq>daily</changefreq> |
||||
</url><url> |
||||
<loc>https://k3d.io/usage/guides/cuda/</loc> |
||||
<lastmod>2021-03-11</lastmod> |
||||
<lastmod>2021-03-12</lastmod> |
||||
<changefreq>daily</changefreq> |
||||
</url><url> |
||||
<loc>https://k3d.io/internals/defaults/</loc> |
||||
<lastmod>2021-03-11</lastmod> |
||||
<lastmod>2021-03-12</lastmod> |
||||
<changefreq>daily</changefreq> |
||||
</url><url> |
||||
<loc>https://k3d.io/internals/networking/</loc> |
||||
<lastmod>2021-03-11</lastmod> |
||||
<lastmod>2021-03-12</lastmod> |
||||
<changefreq>daily</changefreq> |
||||
</url><url> |
||||
<loc>https://k3d.io/faq/faq/</loc> |
||||
<lastmod>2021-03-11</lastmod> |
||||
<lastmod>2021-03-12</lastmod> |
||||
<changefreq>daily</changefreq> |
||||
</url><url> |
||||
<loc>https://k3d.io/faq/v1vsv3-comparison/</loc> |
||||
<lastmod>2021-03-11</lastmod> |
||||
<lastmod>2021-03-12</lastmod> |
||||
<changefreq>daily</changefreq> |
||||
</url> |
||||
</urlset> |
Binary file not shown.
@ -0,0 +1,850 @@ |
||||
|
||||
<!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/usage/configfile/"> |
||||
|
||||
<link rel="shortcut icon" href="../../static/img/favicons_black_blue/favicon.png"> |
||||
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-7.0.5"> |
||||
|
||||
|
||||
|
||||
<title>Config File - k3d</title> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../assets/stylesheets/main.77f3fd56.min.css"> |
||||
|
||||
|
||||
<link rel="stylesheet" href="../../assets/stylesheets/palette.7fa14f5b.min.css"> |
||||
|
||||
|
||||
|
||||
<meta name="theme-color" content="#000000"> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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="" data-md-color-primary="black" data-md-color-accent="grey"> |
||||
|
||||
|
||||
|
||||
<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="#config-file" 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="https://k3d.io/" title="k3d" class="md-header__button md-logo" aria-label="k3d"> |
||||
|
||||
<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"> |
||||
|
||||
Config File |
||||
|
||||
</span> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="md-header__options"> |
||||
|
||||
</div> |
||||
|
||||
<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" data-md-state="active" 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> |
||||
<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.41L17.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> |
||||
</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 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg> |
||||
</div> |
||||
<div class="md-source__repository"> |
||||
rancher/k3d |
||||
</div> |
||||
</a> |
||||
</div> |
||||
|
||||
</nav> |
||||
</header> |
||||
|
||||
<div class="md-container" data-md-component="container"> |
||||
|
||||
|
||||
|
||||
|
||||
<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" aria-label="Navigation" data-md-level="0"> |
||||
<label class="md-nav__title" for="__drawer"> |
||||
<a href="https://k3d.io/" title="k3d" class="md-nav__button md-logo" aria-label="k3d"> |
||||
|
||||
<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 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></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"> |
||||
<a href="../.." class="md-nav__link"> |
||||
Overview |
||||
</a> |
||||
</li> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item md-nav__item--active md-nav__item--nested"> |
||||
|
||||
|
||||
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_2" type="checkbox" id="__nav_2" checked> |
||||
|
||||
<label class="md-nav__link" for="__nav_2"> |
||||
Usage |
||||
<span class="md-nav__icon md-icon"></span> |
||||
</label> |
||||
<nav class="md-nav" aria-label="Usage" data-md-level="1"> |
||||
<label class="md-nav__title" for="__nav_2"> |
||||
<span class="md-nav__icon md-icon"></span> |
||||
Usage |
||||
</label> |
||||
<ul class="md-nav__list" data-md-scrollfix> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="../commands/" class="md-nav__link"> |
||||
Command Tree |
||||
</a> |
||||
</li> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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"> |
||||
Config File |
||||
<span class="md-nav__icon md-icon"></span> |
||||
</label> |
||||
|
||||
<a href="./" class="md-nav__link md-nav__link--active"> |
||||
Config File |
||||
</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="#introduction" class="md-nav__link"> |
||||
Introduction |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#required-fields" class="md-nav__link"> |
||||
Required Fields |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#config-options" class="md-nav__link"> |
||||
Config Options |
||||
</a> |
||||
|
||||
<nav class="md-nav" aria-label="Config Options"> |
||||
<ul class="md-nav__list"> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#all-options-example" class="md-nav__link"> |
||||
All Options: Example |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
</ul> |
||||
</nav> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#config-file-vs-cli-flags" class="md-nav__link"> |
||||
Config File vs. CLI Flags |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#references" class="md-nav__link"> |
||||
References |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
</ul> |
||||
|
||||
</nav> |
||||
|
||||
</li> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="../kubeconfig/" class="md-nav__link"> |
||||
Handling Kubeconfigs |
||||
</a> |
||||
</li> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="../multiserver/" class="md-nav__link"> |
||||
Creating multi-server clusters |
||||
</a> |
||||
</li> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item md-nav__item--nested"> |
||||
|
||||
|
||||
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_2_5" type="checkbox" id="__nav_2_5" > |
||||
|
||||
<label class="md-nav__link" for="__nav_2_5"> |
||||
Guides |
||||
<span class="md-nav__icon md-icon"></span> |
||||
</label> |
||||
<nav class="md-nav" aria-label="Guides" data-md-level="2"> |
||||
<label class="md-nav__title" for="__nav_2_5"> |
||||
<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="../guides/exposing_services/" class="md-nav__link"> |
||||
Exposing Services |
||||
</a> |
||||
</li> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="../guides/registries/" class="md-nav__link"> |
||||
Registries |
||||
</a> |
||||
</li> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="../guides/calico/" class="md-nav__link"> |
||||
Use Calico instead of Flannel |
||||
</a> |
||||
</li> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="../guides/cuda/" class="md-nav__link"> |
||||
Running CUDA workloads |
||||
</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" type="checkbox" id="__nav_3" > |
||||
|
||||
<label class="md-nav__link" for="__nav_3"> |
||||
Internals |
||||
<span class="md-nav__icon md-icon"></span> |
||||
</label> |
||||
<nav class="md-nav" aria-label="Internals" data-md-level="1"> |
||||
<label class="md-nav__title" for="__nav_3"> |
||||
<span class="md-nav__icon md-icon"></span> |
||||
Internals |
||||
</label> |
||||
<ul class="md-nav__list" data-md-scrollfix> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="../../internals/defaults/" class="md-nav__link"> |
||||
Defaults |
||||
</a> |
||||
</li> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="../../internals/networking/" class="md-nav__link"> |
||||
Networking |
||||
</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_4" type="checkbox" id="__nav_4" > |
||||
|
||||
<label class="md-nav__link" for="__nav_4"> |
||||
FAQ |
||||
<span class="md-nav__icon md-icon"></span> |
||||
</label> |
||||
<nav class="md-nav" aria-label="FAQ" data-md-level="1"> |
||||
<label class="md-nav__title" for="__nav_4"> |
||||
<span class="md-nav__icon md-icon"></span> |
||||
FAQ |
||||
</label> |
||||
<ul class="md-nav__list" data-md-scrollfix> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="../../faq/faq/" class="md-nav__link"> |
||||
FAQ / Nice to know |
||||
</a> |
||||
</li> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="../../faq/v1vsv3-comparison/" class="md-nav__link"> |
||||
Feature Comparison: v1 vs. v3 |
||||
</a> |
||||
</li> |
||||
|
||||
|
||||
|
||||
</ul> |
||||
</nav> |
||||
</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="#introduction" class="md-nav__link"> |
||||
Introduction |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#required-fields" class="md-nav__link"> |
||||
Required Fields |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#config-options" class="md-nav__link"> |
||||
Config Options |
||||
</a> |
||||
|
||||
<nav class="md-nav" aria-label="Config Options"> |
||||
<ul class="md-nav__list"> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#all-options-example" class="md-nav__link"> |
||||
All Options: Example |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
</ul> |
||||
</nav> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#config-file-vs-cli-flags" class="md-nav__link"> |
||||
Config File vs. CLI Flags |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#references" class="md-nav__link"> |
||||
References |
||||
</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/master/docs/usage/configfile.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="config-file">Config File<a class="headerlink" href="#config-file" title="Permanent link">¶</a></h1> |
||||
<h2 id="introduction">Introduction<a class="headerlink" href="#introduction" title="Permanent link">¶</a></h2> |
||||
<p>As of k3d v4.0.0, released in January 2021, k3d ships with configuration file support for the <code>k3d cluster create</code> command. |
||||
This allows you to define all the things that you defined with CLI flags before in a nice and tidy YAML (as a Kubernetes user, we know you love it ;) ).</p> |
||||
<div class="admonition info"> |
||||
<p class="admonition-title">Syntax & Semantics</p> |
||||
<p>The options defined in the config file are not 100% the same as the CLI flags. |
||||
This concerns naming and style/usage/structure, e.g.</p> |
||||
<ul> |
||||
<li><code>--api-port</code> is split up into a field named <code>kubeAPI</code> that has 3 different “child fields” (<code>host</code>, <code>hostIP</code> and <code>hostPort</code>)</li> |
||||
<li>k3d options are bundled in a scope named <code>options.k3d</code>, where <code>--no-rollback</code> is defined as <code>options.k3d.disableRollback</code></li> |
||||
<li>repeatable flags (like <code>--port</code>) are reflected as YAML lists</li> |
||||
</ul> |
||||
</div> |
||||
<h2 id="required-fields">Required Fields<a class="headerlink" href="#required-fields" title="Permanent link">¶</a></h2> |
||||
<p>As of the time of writing this documentation, the config file only <strong>requires</strong> you to define two fields:</p> |
||||
<ul> |
||||
<li><code>apiVersion</code> to match the version of the config file that you want to use (at this time it would be <code>apiVersion: k3d.io/v1alpha2</code>)</li> |
||||
<li><code>kind</code> to define the kind of config file that you want to use (currently we only have the <code>Simple</code> config)</li> |
||||
</ul> |
||||
<p>So this would be the minimal config file, which configures absolutely nothing:</p> |
||||
<div class="highlight"><pre><span></span><code><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">k3d.io/v1alpha2</span> |
||||
<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Simple</span> |
||||
</code></pre></div> |
||||
<h2 id="config-options">Config Options<a class="headerlink" href="#config-options" title="Permanent link">¶</a></h2> |
||||
<p>The configuration options for k3d are continuously evolving and so is the config file (syntax) itself. |
||||
Currently, the config file is still in an Alpha-State, meaning, that it is subject to change anytime (though we try to keep breaking changes low).</p> |
||||
<div class="admonition info"> |
||||
<p class="admonition-title">Validation via JSON-Schema</p> |
||||
<p>k3d uses a <a href="https://json-schema.org/">JSON-Schema</a> to describe the expected format and fields of the configuration file. |
||||
This schema is also used to <a href="https://github.com/xeipuuv/gojsonschema#validation">validate</a> a user-given config file. |
||||
This JSON-Schema can be found in the specific config version sub-directory in the repository (e.g. <a href="https://github.com/rancher/k3d/blob/main/pkg/config/v1alpha2/schema.json">here for <code>v1alpha2</code></a>) and could be used to lookup supported fields or by linters to validate the config file, e.g. in yur code editor.</p> |
||||
</div> |
||||
<h3 id="all-options-example">All Options: Example<a class="headerlink" href="#all-options-example" title="Permanent link">¶</a></h3> |
||||
<p>Since the config options and the config file are changing quite a bit, it’s hard to keep track of all the supported config file settinggs, so here’s an example showing all of them as of the time of writing:</p> |
||||
<div class="highlight"><pre><span></span><code><span class="c1"># k3d configuration file, saved as e.g. /home/me/myk3dcluster.yaml</span> |
||||
<span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">k3d.io/v1alpha2</span> <span class="c1"># this will change in the future as we make everything more stable</span> |
||||
<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Simple</span> <span class="c1"># internally, we also have a Cluster config, which is not yet available externally</span> |
||||
<span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">mycluster</span> <span class="c1"># name that you want to give to your cluster (will still be prefixed with `k3d-`)</span> |
||||
<span class="nt">servers</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">1</span> <span class="c1"># same as `--servers 1`</span> |
||||
<span class="nt">agents</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">2</span> <span class="c1"># same as `--agents 2`</span> |
||||
<span class="nt">kubeAPI</span><span class="p">:</span> <span class="c1"># same as `--api-port myhost.my.domain:6445` (where the name would resolve to 127.0.0.1)</span> |
||||
<span class="nt">host</span><span class="p">:</span> <span class="s">"myhost.my.domain"</span> <span class="c1"># important for the `server` setting in the kubeconfig</span> |
||||
<span class="nt">hostIP</span><span class="p">:</span> <span class="s">"127.0.0.1"</span> <span class="c1"># where the Kubernetes API will be listening on</span> |
||||
<span class="nt">hostPort</span><span class="p">:</span> <span class="s">"6445"</span> <span class="c1"># where the Kubernetes API listening port will be mapped to on your host system</span> |
||||
<span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">rancher/k3s:v1.20.4-k3s1</span> <span class="c1"># same as `--image rancher/k3s:v1.20.4-k3s1`</span> |
||||
<span class="nt">network</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">my-custom-net</span> <span class="c1"># same as `--network my-custom-net`</span> |
||||
<span class="nt">token</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">superSecretToken</span> <span class="c1"># same as `--token superSecretToken`</span> |
||||
<span class="nt">volumes</span><span class="p">:</span> <span class="c1"># repeatable flags are represented as YAML lists</span> |
||||
<span class="p p-Indicator">-</span> <span class="nt">volume</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">/my/host/path:/path/in/node</span> <span class="c1"># same as `--volume '/my/host/path:/path/in/node@server[0];agent[*]'`</span> |
||||
<span class="nt">nodeFilters</span><span class="p">:</span> |
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">server[0]</span> |
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">agent[*]</span> |
||||
<span class="nt">ports</span><span class="p">:</span> |
||||
<span class="p p-Indicator">-</span> <span class="nt">port</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">8080:80</span> <span class="c1"># same as `--port '8080:80@loadbalancer'`</span> |
||||
<span class="nt">nodeFilters</span><span class="p">:</span> |
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">loadbalancer</span> |
||||
<span class="nt">labels</span><span class="p">:</span> |
||||
<span class="p p-Indicator">-</span> <span class="nt">label</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">foo=bar</span> <span class="c1"># same as `--label 'foo=bar@agent[1]'`</span> |
||||
<span class="nt">nodeFilters</span><span class="p">:</span> |
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">agent[1]</span> |
||||
<span class="nt">env</span><span class="p">:</span> |
||||
<span class="p p-Indicator">-</span> <span class="nt">envVar</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">bar=baz</span> <span class="c1"># same as `--env 'bar=baz@server[0]'`</span> |
||||
<span class="nt">nodeFilters</span><span class="p">:</span> |
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">server[0]</span> |
||||
<span class="nt">registries</span><span class="p">:</span> <span class="c1"># define how registries should be created or used</span> |
||||
<span class="nt">create</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span> <span class="c1"># creates a default registry to be used with the cluster; same as `--registry-create`</span> |
||||
<span class="nt">use</span><span class="p">:</span> |
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">k3d-myotherregistry:5000</span> <span class="c1"># some other k3d-managed registry; same as `--registry-use 'k3d-myotherregistry:5000'`</span> |
||||
<span class="nt">config</span><span class="p">:</span> <span class="p p-Indicator">|</span> <span class="c1"># define contents of the `registries.yaml` file (or reference a file); same as `--registry-config /path/to/config.yaml`</span> |
||||
<span class="no">mirrors:</span> |
||||
<span class="no">"my.company.registry":</span> |
||||
<span class="no">endpoint:</span> |
||||
<span class="no">- http://my.company.registry:5000</span> |
||||
<span class="nt">options</span><span class="p">:</span> |
||||
<span class="nt">k3d</span><span class="p">:</span> <span class="c1"># k3d runtime settings</span> |
||||
<span class="nt">wait</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span> <span class="c1"># wait for cluster to be usable before returining; same as `--wait` (default: true)</span> |
||||
<span class="nt">timeout</span><span class="p">:</span> <span class="s">"60s"</span> <span class="c1"># wait timeout before aborting; same as `--timeout 60s`</span> |
||||
<span class="nt">disableLoadbalancer</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">false</span> <span class="c1"># same as `--no-lb`</span> |
||||
<span class="nt">disableImageVolume</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">false</span> <span class="c1"># same as `--no-image-volume`</span> |
||||
<span class="nt">disableRollback</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">false</span> <span class="c1"># same as `--no-Rollback`</span> |
||||
<span class="nt">disableHostIPInjection</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">false</span> <span class="c1"># same as `--no-hostip`</span> |
||||
<span class="nt">k3s</span><span class="p">:</span> <span class="c1"># options passed on to K3s itself</span> |
||||
<span class="nt">extraServerArgs</span><span class="p">:</span> <span class="c1"># additional arguments passed to the `k3s server` command; same as `--k3s-server-arg`</span> |
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">--tls-san=my.host.domain</span> |
||||
<span class="nt">extraAgentArgs</span><span class="p">:</span> <span class="p p-Indicator">[]</span> <span class="c1"># addditional arguments passed to the `k3s agent` command; same as `--k3s-agent-arg`</span> |
||||
<span class="nt">kubeconfig</span><span class="p">:</span> |
||||
<span class="nt">updateDefaultKubeconfig</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span> <span class="c1"># add new cluster to your default Kubeconfig; same as `--kubeconfig-update-default` (default: true)</span> |
||||
<span class="nt">switchCurrentContext</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span> <span class="c1"># also set current-context to the new cluster's context; same as `--kubeconfig-switch-context` (default: true)</span> |
||||
<span class="nt">runtime</span><span class="p">:</span> <span class="c1"># runtime (docker) specific options</span> |
||||
<span class="nt">gpuRequest</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">all</span> <span class="c1"># same as `--gpus all`</span> |
||||
</code></pre></div> |
||||
<h2 id="config-file-vs-cli-flags">Config File vs. CLI Flags<a class="headerlink" href="#config-file-vs-cli-flags" title="Permanent link">¶</a></h2> |
||||
<p>k3d uses <a href="https://github.com/spf13/cobra"><code>Cobra</code></a> and <a href="https://github.com/spf13/viper"><code>Viper</code></a> for CLI and general config handling respectively. |
||||
This automatically introduces a “config option order of priority” (<a href="https://github.com/spf13/viper#why-viper">precedence order</a>):</p> |
||||
<div class="admonition info"> |
||||
<p class="admonition-title">Config Precedence Order</p> |
||||
<p>Source: <a href="https://github.com/spf13/viper#why-viper">spf13/viper#why-viper</a></p> |
||||
<p>Internal Setting > <strong>CLI Flag</strong> > Environment Variable > <strong>Config File</strong> > (k/v store >) Defaults</p> |
||||
</div> |
||||
<p>This means, that you can define e.g. a “base configuration file” with settings that you share across different clusters and override only the fields that differ between those clusters in your CLI flags/arguments. |
||||
For example, you use the same config file to create three clusters which only have different names and <code>kubeAPI</code> (<code>--api-port</code>) settings.</p> |
||||
<h2 id="references">References<a class="headerlink" href="#references" title="Permanent link">¶</a></h2> |
||||
<ul> |
||||
<li>k3d demo repository: <a href="https://github.com/iwilltry42/k3d-demo/blob/main/README.md#config-file-support">https://github.com/iwilltry42/k3d-demo/blob/main/README.md#config-file-support</a></li> |
||||
<li>SUSE Blog: <a href="https://www.suse.com/c/introduction-k3d-run-k3s-docker-src/">https://www.suse.com/c/introduction-k3d-run-k3s-docker-src/</a> (Search fo <code>The “Configuration as Code” Way</code>)</li> |
||||
</ul> |
||||
|
||||
|
||||
|
||||
|
||||
<hr> |
||||
<div class="md-source-date"> |
||||
<small> |
||||
|
||||
Last update: <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">March 12, 2021</span> |
||||
|
||||
</small> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article> |
||||
</div> |
||||
</div> |
||||
</main> |
||||
|
||||
|
||||
<footer class="md-footer"> |
||||
|
||||
<nav class="md-footer__inner md-grid" aria-label="Footer"> |
||||
|
||||
<a href="../commands/" class="md-footer__link md-footer__link--prev" rel="prev"> |
||||
<div class="md-footer__button md-icon"> |
||||
<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> |
||||
</div> |
||||
<div class="md-footer__title"> |
||||
<div class="md-ellipsis"> |
||||
<span class="md-footer__direction"> |
||||
Previous |
||||
</span> |
||||
Command Tree |
||||
</div> |
||||
</div> |
||||
</a> |
||||
|
||||
|
||||
<a href="../kubeconfig/" class="md-footer__link md-footer__link--next" rel="next"> |
||||
<div class="md-footer__title"> |
||||
<div class="md-ellipsis"> |
||||
<span class="md-footer__direction"> |
||||
Next |
||||
</span> |
||||
Handling Kubeconfigs |
||||
</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 © 2020 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": ["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"}, "search": "../../assets/javascripts/workers/search.fb4a9340.min.js", "version": null}</script> |
||||
|
||||
|
||||
<script src="../../assets/javascripts/bundle.5cf3e710.min.js"></script> |
||||
|
||||
<script src="../../static/js/asciinema-player.js"></script> |
||||
|
||||
|
||||
</body> |
||||
</html> |
Loading…
Reference in new issue