mirror of https://github.com/k3d-io/k3d
commit
139eadec19
@ -1,4 +1,3 @@ |
||||
title: FAQ |
||||
nav: |
||||
- faq.md |
||||
- v1vsv3-comparison.md |
@ -1,63 +0,0 @@ |
||||
# Feature Comparison: v1 vs. v3 |
||||
|
||||
## v1.x feature -> implementation in v3 |
||||
|
||||
```text |
||||
- k3d |
||||
- check-tools -> won't do |
||||
- shell -> planned: `k3d shell CLUSTER` |
||||
- --name -> planned: drop (now as arg) |
||||
- --command -> planned: keep |
||||
- --shell -> planned: keep (or second arg) |
||||
- auto, bash, zsh |
||||
- create -> `k3d cluster create CLUSTERNAME` |
||||
- --name -> dropped, implemented via arg |
||||
- --volume -> implemented |
||||
- --port -> implemented |
||||
- --port-auto-offset -> TBD |
||||
- --api-port -> implemented |
||||
- --wait -> implemented |
||||
- --image -> implemented |
||||
- --server-arg -> implemented as `--k3s-server-arg` |
||||
- --agent-arg -> implemented as `--k3s-agent-arg` |
||||
- --env -> planned |
||||
- --label -> planned |
||||
- --workers -> implemented |
||||
- --auto-restart -> dropped (docker's `unless-stopped` is set by default) |
||||
- --enable-registry -> coming in v4.0.0 (2021) as `--registry-create` and `--registry-use` |
||||
- --registry-name -> TBD |
||||
- --registry-port -> TBD |
||||
- --registry-volume -> TBD |
||||
- --registries-file -> TBD |
||||
- --enable-registry-cache -> TBD |
||||
- (add-node) -> `k3d node create NODENAME` |
||||
- --role -> implemented |
||||
- --name -> dropped, implemented as arg |
||||
- --count -> implemented as `--replicas` |
||||
- --image -> implemented |
||||
- --arg -> planned |
||||
- --env -> planned |
||||
- --volume -> planned |
||||
- --k3s -> TBD |
||||
- --k3s-secret -> TBD |
||||
- --k3s-token -> TBD |
||||
- delete -> `k3d cluster delete CLUSTERNAME` |
||||
- --name -> dropped, implemented as arg |
||||
- --all -> implemented |
||||
- --prune -> TBD |
||||
- --keep-registry-volume -> TBD |
||||
- stop -> `k3d cluster stop CLUSTERNAME` |
||||
- --name -> dropped, implemented as arg |
||||
- --all -> implemented |
||||
- start -> `k3d cluster start CLUSTERNAME` |
||||
- --name -> dropped, implemented as arg |
||||
- --all -> implemented |
||||
- list -> dropped, implemented as `k3d get clusters` |
||||
- get-kubeconfig -> `k3d kubeconfig get|merge CLUSTERNAME` |
||||
- --name -> dropped, implemented as arg |
||||
- --all -> implemented |
||||
- --overwrite -> implemented |
||||
- import-images -> `k3d image import [--cluster CLUSTERNAME] [--keep] IMAGES` |
||||
- --name -> implemented as `--cluster` |
||||
- --no-remove -> implemented as `--keep-tarball` |
||||
``` |
@ -1,15 +1,22 @@ |
||||
# Defaults |
||||
|
||||
- multiple server nodes |
||||
- by default, when `--server` > 1 and no `--datastore-x` option is set, the first server node (server-0) will be the initializing server node |
||||
## Multiple server nodes |
||||
|
||||
- by default, when `--server` > 1 and no `--datastore-x` option is set, the first server node (server-0) will be the initializing server node |
||||
- the initializing server node will have the `--cluster-init` flag appended |
||||
- all other server nodes will refer to the initializing server node via `--server https://<init-node>:6443` |
||||
- API-Ports |
||||
- by default, we expose the API-Port (`6443`) by forwarding traffic from the default server loadbalancer (nginx container) to the server node(s) |
||||
- port `6443` of the loadbalancer is then mapped to a specific (`--api-port` flag) or a random (default) port on the host system |
||||
- kubeconfig |
||||
- if `--kubeconfig-update-default` is set, we use the default loading rules to get the default kubeconfig: |
||||
|
||||
## API-Ports |
||||
|
||||
- by default, we expose the API-Port (`6443`) by forwarding traffic from the default server loadbalancer (nginx container) to the server node(s) |
||||
- port `6443` of the loadbalancer is then mapped to a specific (`--api-port` flag) or a random (default) port on the host system |
||||
|
||||
## Kubeconfig |
||||
|
||||
- if `--kubeconfig-update-default` is set, we use the default loading rules to get the default kubeconfig: |
||||
- First: kubeconfig specified via the KUBECONFIG environment variable (error out if multiple are specified) |
||||
- Second: default kubeconfig in home directory (e.g. `$HOME/.kube/config`) |
||||
- Networking |
||||
- [by default, k3d creates a new (docker) network for every cluster](./networking) |
||||
|
||||
## Networking |
||||
|
||||
- [by default, k3d creates a new (docker) network for every cluster](./networking) |
||||
|
@ -0,0 +1,53 @@ |
||||
/* |
||||
Copyright © 2020-2021 The k3d Author(s) |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software and associated documentation files (the "Software"), to deal |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in |
||||
all copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||||
THE SOFTWARE. |
||||
*/ |
||||
package client |
||||
|
||||
import ( |
||||
"os" |
||||
"strconv" |
||||
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes" |
||||
"github.com/rancher/k3d/v4/pkg/types/fixes" |
||||
log "github.com/sirupsen/logrus" |
||||
) |
||||
|
||||
// FIXME: FixCgroupV2 - to be removed when fixed upstream
|
||||
func EnableCgroupV2FixIfNeeded(runtime runtimes.Runtime) { |
||||
if _, isSet := os.LookupEnv(fixes.EnvFixCgroupV2); !isSet { |
||||
runtimeInfo, err := runtime.Info() |
||||
if err != nil { |
||||
log.Warnf("Failed to get runtime information: %+v", err) |
||||
return |
||||
} |
||||
cgroupVersion, err := strconv.Atoi(runtimeInfo.CgroupVersion) |
||||
if err != nil { |
||||
log.Debugf("Failed to parse cgroupVersion: %+v", err) |
||||
return |
||||
} |
||||
if cgroupVersion == 2 { |
||||
log.Debugf("Detected CgroupV2, enabling custom entrypoint (disable by setting %s=false)", fixes.EnvFixCgroupV2) |
||||
if err := os.Setenv(fixes.EnvFixCgroupV2, "true"); err != nil { |
||||
log.Errorf("Detected CgroupsV2 but failed to enable k3d's hotfix (try `export %s=true`): %+v", fixes.EnvFixCgroupV2, err) |
||||
} |
||||
} |
||||
} |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue