From f721681f4ee7964390804b71f58d83a76c09fc89 Mon Sep 17 00:00:00 2001 From: iwilltry42 Date: Fri, 26 Nov 2021 08:12:18 +0100 Subject: [PATCH] remove legacy v4.4.8-docs.0 containing files --- 404.html | 898 ---- faq/faq/index.html | 1466 ------- internals/defaults/index.html | 1106 ----- internals/networking/index.html | 1127 ----- internals/project/index.html | 1272 ------ sitemap.xml | 203 - usage/commands/index.html | 1075 ----- usage/commands/k3d/index.html | 1117 ----- usage/commands/k3d_cluster/index.html | 1127 ----- usage/commands/k3d_cluster_create/index.html | 1159 ----- usage/commands/k3d_cluster_delete/index.html | 1123 ----- usage/commands/k3d_cluster_list/index.html | 1125 ----- usage/commands/k3d_cluster_start/index.html | 1125 ----- usage/commands/k3d_cluster_stop/index.html | 1123 ----- usage/commands/k3d_completion/index.html | 1122 ----- usage/commands/k3d_config/index.html | 1123 ----- usage/commands/k3d_config_init/index.html | 1107 ----- usage/commands/k3d_docgen/index.html | 1106 ----- usage/commands/k3d_image/index.html | 1123 ----- usage/commands/k3d_image_import/index.html | 1133 ----- usage/commands/k3d_kubeconfig/index.html | 1124 ----- usage/commands/k3d_kubeconfig_get/index.html | 1123 ----- .../commands/k3d_kubeconfig_merge/index.html | 1128 ----- usage/commands/k3d_node/index.html | 1127 ----- usage/commands/k3d_node_create/index.html | 1129 ----- usage/commands/k3d_node_delete/index.html | 1124 ----- usage/commands/k3d_node_list/index.html | 1124 ----- usage/commands/k3d_node_start/index.html | 1122 ----- usage/commands/k3d_node_stop/index.html | 1122 ----- usage/commands/k3d_registry/index.html | 1125 ----- usage/commands/k3d_registry_create/index.html | 1126 ----- usage/commands/k3d_registry_delete/index.html | 1123 ----- usage/commands/k3d_registry_list/index.html | 1124 ----- usage/commands/k3d_version/index.html | 1122 ----- usage/configfile/index.html | 1250 ------ usage/guides/calico.yaml | 3755 ----------------- usage/guides/calico/index.html | 1129 ----- usage/guides/cuda/Dockerfile | 47 - usage/guides/cuda/build.sh | 21 - usage/guides/cuda/config.toml.tmpl | 55 - usage/guides/cuda/cuda-vector-add.yaml | 12 - .../guides/cuda/device-plugin-daemonset.yaml | 41 - usage/guides/cuda/index.html | 1408 ------ usage/guides/exposing_services/index.html | 1159 ----- usage/guides/registries/index.html | 1419 ------- usage/kubeconfig/index.html | 1131 ----- usage/multiserver/index.html | 1072 ----- 47 files changed, 50002 deletions(-) delete mode 100644 404.html delete mode 100644 faq/faq/index.html delete mode 100644 internals/defaults/index.html delete mode 100644 internals/networking/index.html delete mode 100644 internals/project/index.html delete mode 100644 sitemap.xml delete mode 100644 usage/commands/index.html delete mode 100644 usage/commands/k3d/index.html delete mode 100644 usage/commands/k3d_cluster/index.html delete mode 100644 usage/commands/k3d_cluster_create/index.html delete mode 100644 usage/commands/k3d_cluster_delete/index.html delete mode 100644 usage/commands/k3d_cluster_list/index.html delete mode 100644 usage/commands/k3d_cluster_start/index.html delete mode 100644 usage/commands/k3d_cluster_stop/index.html delete mode 100644 usage/commands/k3d_completion/index.html delete mode 100644 usage/commands/k3d_config/index.html delete mode 100644 usage/commands/k3d_config_init/index.html delete mode 100644 usage/commands/k3d_docgen/index.html delete mode 100644 usage/commands/k3d_image/index.html delete mode 100644 usage/commands/k3d_image_import/index.html delete mode 100644 usage/commands/k3d_kubeconfig/index.html delete mode 100644 usage/commands/k3d_kubeconfig_get/index.html delete mode 100644 usage/commands/k3d_kubeconfig_merge/index.html delete mode 100644 usage/commands/k3d_node/index.html delete mode 100644 usage/commands/k3d_node_create/index.html delete mode 100644 usage/commands/k3d_node_delete/index.html delete mode 100644 usage/commands/k3d_node_list/index.html delete mode 100644 usage/commands/k3d_node_start/index.html delete mode 100644 usage/commands/k3d_node_stop/index.html delete mode 100644 usage/commands/k3d_registry/index.html delete mode 100644 usage/commands/k3d_registry_create/index.html delete mode 100644 usage/commands/k3d_registry_delete/index.html delete mode 100644 usage/commands/k3d_registry_list/index.html delete mode 100644 usage/commands/k3d_version/index.html delete mode 100644 usage/configfile/index.html delete mode 100644 usage/guides/calico.yaml delete mode 100644 usage/guides/calico/index.html delete mode 100644 usage/guides/cuda/Dockerfile delete mode 100644 usage/guides/cuda/build.sh delete mode 100644 usage/guides/cuda/config.toml.tmpl delete mode 100644 usage/guides/cuda/cuda-vector-add.yaml delete mode 100644 usage/guides/cuda/device-plugin-daemonset.yaml delete mode 100644 usage/guides/cuda/index.html delete mode 100644 usage/guides/exposing_services/index.html delete mode 100644 usage/guides/registries/index.html delete mode 100644 usage/kubeconfig/index.html delete mode 100644 usage/multiserver/index.html diff --git a/404.html b/404.html deleted file mode 100644 index 55a72a5b..00000000 --- a/404.html +++ /dev/null @@ -1,898 +0,0 @@ - - - - - - - - - - - - - - - - - - - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
- -

404 - Not found

- - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/faq/faq/index.html b/faq/faq/index.html deleted file mode 100644 index 59fcd6dc..00000000 --- a/faq/faq/index.html +++ /dev/null @@ -1,1466 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - FAQ / Nice to know - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - - - - -
-
- - - - - - - -

FAQ / Nice to know

-

Issues with BTRFS

-
    -
  • As @jaredallard pointed out, people running k3d on a system with btrfs, may need to mount /dev/mapper into the nodes for the setup to work.
      -
    • This will do: k3d cluster create CLUSTER_NAME -v /dev/mapper:/dev/mapper
    • -
    -
  • -
-

Issues with ZFS

-
    -
  • -

    k3s currently has no support for ZFS and thus, creating multi-server setups (e.g. k3d cluster create multiserver --servers 3) fails, because the initializing server node (server flag --cluster-init) errors out with the following log:

    -
    starting kubernetes: preparing server: start cluster and https: raft_init(): io: create I/O capabilities probe file: posix_allocate: operation not supported on socket
    -
    - -
  • -
-

Pods evicted due to lack of disk space

-
    -
  • Pods go to evicted state after doing X
      -
    • Related issues: #133 - Pods evicted due to NodeHasDiskPressure (collection of #119 and #130)
    • -
    • Background: somehow docker runs out of space for the k3d node containers, which triggers a hard eviction in the kubelet
    • -
    • Possible fix/workaround by @zer0def:
        -
      • use a docker storage driver which cleans up properly (e.g. overlay2)
      • -
      • clean up or expand docker root filesystem
      • -
      • -

        change the kubelet’s eviction thresholds upon cluster creation:

        -
        k3d cluster create \
        -  --k3s-agent-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%' \
        -  --k3s-agent-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%'
        -
        -
      • -
      -
    • -
    -
  • -
-

Restarting a multi-server cluster or the initializing server node fails

-
    -
  • What you do: You create a cluster with more than one server node and later, you either stop server-0 or stop/start the whole cluster
  • -
  • What fails: After the restart, you cannot connect to the cluster anymore and kubectl will give you a lot of errors
  • -
  • What causes this issue: it’s a known issue with dqlite in k3s which doesn’t allow the initializing server node to go down
  • -
  • What’s the solution: Hopefully, this will be solved by the planned replacement of dqlite with embedded etcd in k3s
  • -
  • Related issues: #262
  • -
-

Passing additional arguments/flags to k3s (and on to e.g. the kube-apiserver)

-
    -
  • The Problem: Passing a feature flag to the Kubernetes API Server running inside k3s.
  • -
  • Example: you want to enable the EphemeralContainers feature flag in Kubernetes
  • -
  • Solution: k3d cluster create --k3s-server-arg '--kube-apiserver-arg=feature-gates=EphemeralContainers=true'
      -
    • Note: Be aware of where the flags require dashes (--) and where not.
        -
      • the k3s flag (--kube-apiserver-arg) has the dashes
      • -
      • the kube-apiserver flag feature-gates doesn’t have them (k3s adds them internally)
      • -
      -
    • -
    -
  • -
-
    -
  • -

    Second example:

    -
    k3d cluster create k3d-one \
    -  --k3s-server-arg --cluster-cidr="10.118.0.0/17" \
    -  --k3s-server-arg --service-cidr="10.118.128.0/17" \
    -  --k3s-server-arg --disable=servicelb \
    -  --k3s-server-arg --disable=traefik \
    -  --verbose
    -
    -
      -
    • Note: There are many ways to use the " and ' quotes, just be aware, that sometimes shells also try to interpret/interpolate parts of the commands
    • -
    -
  • -
-

How to access services (like a database) running on my Docker Host Machine

-
    -
  • As of version v3.1.0, we’re injecting the host.k3d.internal entry into the k3d containers (k3s nodes) and into the CoreDNS ConfigMap, enabling you to access your host system by referring to it as host.k3d.internal
  • -
-

Running behind a corporate proxy

-

Running k3d behind a corporate proxy can lead to some issues with k3d that have already been reported in more than one issue.
-Some can be fixed by passing the HTTP_PROXY environment variables to k3d, some have to be fixed in docker’s daemon.json file and some are as easy as adding a volume mount.

-

Pods fail to start: x509: certificate signed by unknown authority

-
    -
  • -

    Example Error Message:

    -
    Failed to create pod sandbox: rpc error: code = Unknown desc = failed to get sandbox image "docker.io/rancher/pause:3.1": failed to pull image "docker.io/rancher/pause:3.1": failed to pull and unpack image "docker.io/rancher/pause:3.1": failed to resolve reference "docker.io/rancher/pause:3.1": failed to do request: Head https://registry-1.docker.io/v2/rancher/pause/manifests/3.1: x509: certificate signed by unknown authority
    -
    -
  • -
-
    -
  • Problem: inside the container, the certificate of the corporate proxy cannot be validated
  • -
  • Possible Solution: Mounting the CA Certificate from your host into the node containers at start time via k3d cluster create --volume /path/to/your/certs.crt:/etc/ssl/certs/yourcert.crt
  • -
  • Issue: rancher/k3d#535
  • -
-

Spurious PID entries in /proc after deleting k3d cluster with shared mounts

-
    -
  • When you perform cluster create and deletion operations multiple times with same cluster name and shared volume mounts, it was observed that grep k3d /proc/*/mountinfo shows many spurious entries
  • -
  • Problem: Due to above, at times you’ll see no space left on device: unknown when a pod is scheduled to the nodes
  • -
  • If you observe anything of above sort you can check for inaccessible file systems and unmount them by using below command (note: please remove xargs umount -l and check for the diff o/p first)
  • -
  • diff <(df -ha | grep pods | awk '{print $NF}') <(df -h | grep pods | awk '{print $NF}') | awk '{print $2}' | xargs umount -l
  • -
  • As per the conversation on rancher/k3d#594 above issue wasn’t reported/known earlier and so there are high chances that it’s not universal.
  • -
-

[SOLVED] Nodes fail to start or get stuck in NotReady state with log nf_conntrack_max: permission denied

-

Problem

-
    -
  • When: This happens when running k3d on a Linux system with a kernel version >= 5.12.2 (and others like >= 5.11.19) when creating a new cluster
      -
    • the node(s) stop or get stuck with a log line like this: <TIMESTAMP> F0516 05:05:31.782902 7 server.go:495] open /proc/sys/net/netfilter/nf_conntrack_max: permission denied
    • -
    -
  • -
  • Why: The issue was introduced by a change in the Linux kernel (Changelog 5.12.2: Commit), that changed the netfilter_conntrack behavior in a way that kube-proxy is not able to set the nf_conntrack_max value anymore
  • -
-

Workaround

-
    -
  • -

    Workaround: as a workaround, we can tell kube-proxy to not even try to set this value:

    -
    k3d cluster create \
    -  --k3s-server-arg "--kube-proxy-arg=conntrack-max-per-core=0" \
    -  --k3s-agent-arg "--kube-proxy-arg=conntrack-max-per-core=0" \
    -  --image rancher/k3s:v1.20.6-k3s
    -
    -
  • -
-

Fix

-
    -
  • Note: k3d v4.4.5 already uses rancher/k3s:v1.21.1-k3s1 as the new default k3s image, so no workarounds needed there!
  • -
-

This is going to be fixed “upstream” in k3s itself in rancher/k3s#3337 and backported to k3s versions as low as v1.18.

- -

DockerHub Pull Rate Limit

-

Problem

-

You’re deploying something to the cluster using an image from DockerHub and the image fails to be pulled, with a 429 response code and a message saying You have reached your pull rate limit. You may increase the limit by authenticating and upgrading.

-

Cause

-

This is caused by DockerHub’s pull rate limit (see https://docs.docker.com/docker-hub/download-rate-limit/), which limits pulls from unauthenticated/anonymous users to 100 pulls per hour and for authenticated users (not paying customers) to 200 pulls per hour (as of the time of writing).

-

Solution

-

a) use images from a private registry, e.g. configured as a pull-through cache for DockerHub
-b) use a different public registry without such limitations, if the same image is stored there
-c) authenticate containerd inside k3s/k3d to use your DockerHub user

-

(c) Authenticate Containerd against DockerHub

-
    -
  1. -

    Create a registry configuration file for containerd:

    -
    # saved as e.g. $HOME/registries.yaml
    -configs:
    -  "docker.io":
    -    auth:
    -      username: "$USERNAME"
    -      password: "$PASSWORD"
    -
    -
  2. -
  3. -

    Create a k3d cluster using that config:

    -
    k3d cluster create --registry-config $HOME/registries.yaml
    -
    -
  4. -
  5. -

    Profit. That’s it. In the test for this, we pulled the same image 120 times in a row (confirmed, that pull numbers went up), without being rate limited (as a non-paying, normal user)

    -
  6. -
- - - - -
-
- - - Last update: June 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/internals/defaults/index.html b/internals/defaults/index.html deleted file mode 100644 index 591c0d61..00000000 --- a/internals/defaults/index.html +++ /dev/null @@ -1,1106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Defaults - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

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
      -
    • 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:
      -
    • 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

- - - - - -
-
- - - Last update: June 9, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/internals/networking/index.html b/internals/networking/index.html deleted file mode 100644 index cae8e9cf..00000000 --- a/internals/networking/index.html +++ /dev/null @@ -1,1127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Networking - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

Networking

- -

Introduction

-

By default, k3d creates a new (docker) network for every new cluster.
-Using the --network STRING flag upon creation to connect to an existing network.
-Existing networks won’t be managed by k3d together with the cluster lifecycle.

-

Connecting to docker “internal”/pre-defined networks

-

host network

-

When using the --network flag to connect to the host network (i.e. k3d cluster create --network host), you won’t be able to create more than one server node.
-An edge case would be one server node (with agent disabled) and one agent node.

-

bridge network

-

By default, every network that k3d creates is working in bridge mode.
-But when you try to use --network bridge to connect to docker’s internal bridge network, you may run into issues with grabbing certificates from the API-Server.
-Single-Node clusters should work though.

-

none “network”

-

Well.. this doesn’t really make sense for k3d anyway ¯\_(ツ)_/¯

- - - - -
-
- - - Last update: June 9, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/internals/project/index.html b/internals/project/index.html deleted file mode 100644 index 09234ede..00000000 --- a/internals/project/index.html +++ /dev/null @@ -1,1272 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Project Overview - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

Project Overview

-

About This Page

-

On this page we’ll try to give an overview of all the moving bits and pieces in k3d to ease contributions to the project.

-

Directory Overview

-
    -
  • .github/
      -
    • templates for issues and pull requests
    • -
    • GitHub Action workflow definitions
    • -
    -
  • -
  • cmd/
      -
    • everything related to the actual k3d CLI, like the whole command tree, config initialization, argument parsing, etc.
    • -
    -
  • -
  • docgen/
      -
    • sub-module used to auto-generate the documentation for the CLI commands, which ends up in docs/usage/commands/
    • -
    -
  • -
  • docs/
      -
    • all the resources used to build k3d.io using mkdocs
    • -
    -
  • -
  • pkg/
      -
    • the place where the magic happens.. here you find all the main logic of k3d
    • -
    • all function calls within cmd/ that do non-trivial things are imported from here
    • -
    • this (or rather sub-packages) is what other projects would import as a module to work with k3d without using the CLI
    • -
    -
  • -
  • proxy/
      -
    • configuration to build the rancher/k3d-proxy container image which is used as a loadbalancer/proxy in front of (almost) every k3d cluster
    • -
    • this is basically just a combination of NGINX with confd and some k3d-specific configuration details
    • -
    -
  • -
  • tests/
      -
    • a set of bash scripts used for end-to-end (E2E) tests of k3d
    • -
    • mostly used for all the functionality of the k3d CLI which cannot be tested using Go unit tests
    • -
    -
  • -
  • tools/
      -
    • sub-module used to build the rancher/k3d-tools container image which supports some k3d functionality like k3d image import
    • -
    -
  • -
  • vendor/
      -
    • result of go mod vendor, which contains all dependencies of k3d
    • -
    -
  • -
  • version/
      -
    • package used to code k3d/k3s versions into releases
    • -
    • this is where go build injects the version tags when building k3d
        -
      • that’s the output you see when issuing k3d version
      • -
      -
    • -
    -
  • -
-

Packages Overview

-
    -
  • pkg/
      -
    • actions/
        -
      • hook actions describing actions (commands, etc.) that run at specific stages of the node/cluster lifecycle
          -
        • e.g. writing configuration files to the container filesystem just before the node (container) starts
        • -
        -
      • -
      -
    • -
    • client/
        -
      • all the top level functionality to work with k3d primitives
          -
        • create/retrieve/update/delete/start/stop clusters, nodes, registries, etc. managed by k3d
        • -
        -
      • -
      -
    • -
    • config/
        -
      • everything related to the k3d configuration (files), like SimpleConfig and ClusterConfig
      • -
      -
    • -
    • runtimes/
        -
      • interface and implementations of runtimes that power k3d (currently, that’s only Docker)
      • -
      • functions in client/ eventually call runtime functions to “materialize” nodes and clusters
      • -
      -
    • -
    • tools/
        -
      • functions eventually calling the k3d-tools container (see tools/ in the repo root)
      • -
      -
    • -
    • types/
        -
      • definition of all k3d primitives and many other details and defaults
      • -
      • e.g. contains the definition of a Node or a Cluster in k3d
      • -
      -
    • -
    • util/
        -
      • some helper functions e.g. for string manipulation/generation, regexp or other re-usable usages
      • -
      -
    • -
    -
  • -
-

Anatomy of a Cluster

-

By default, every k3d cluster consists of at least 2 containers (nodes):

-
    -
  1. -

    (optional, but default and strongly recommended) loadbalancer

    -
      -
    • image: rancher/k3d-proxy, built from proxy/
    • -
    • purpose: proxy and load balance requests from the outside (i.e. most of the times your local host) to the cluster
        -
      • by default, it e.g. proxies all the traffic for the Kubernetes API to port 6443 (default listening port of K3s) to all the server nodes in the cluster
      • -
      • can be used for multiple port-mappings to one or more nodes in your cluster
          -
        • that way, port-mappings can also easily be added/removed after the cluster creation, as we can simply re-create the proxy without affecting cluster state
        • -
        -
      • -
      -
    • -
    -
  2. -
  3. -

    (required, always present) primary server node

    -
      -
    • image: rancher/k3s, built from github.com/k3s-io/k3s
    • -
    • purpose: (initializing) server (formerly: master) node of the cluster
        -
      • runs the K3s executable (which runs containerd, the Kubernetes API Server, etcd/sqlite, etc.): k3s server
      • -
      • in a multi-server setup, it initializes the cluster with an embedded etcd database (using the K3s --cluster-init flag)
      • -
      -
    • -
    -
  4. -
  5. -

    (optional) secondary server node(s)

    - -
  6. -
  7. -

    (optional) agent node(s)

    - -
  8. -
-

Automation (CI)

-

The k3d repository mainly leverages the following two CI systems:

- -

Documentation

-

The website k3d.io containing all the documentation for k3d is built using mkdocs, configured via the mkdocs.yml config file with all the content residing in the docs/ directory (Markdown).
-Use mkdocs serve in the repository root to build and serve the webpage locally.
-Some parts of the documentation are being auto-generated, like docs/usage/commands/ is auto-generated using Cobra’s command docs generation functionality in docgen/.

- - - - -
-
- - - Last update: July 20, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml deleted file mode 100644 index 3b3815f5..00000000 --- a/sitemap.xml +++ /dev/null @@ -1,203 +0,0 @@ - - - - https://k3d.io/v4.4.8-docs.0/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/faq/faq/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/internals/defaults/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/internals/networking/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/internals/project/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/configfile/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/kubeconfig/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/multiserver/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_cluster/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_cluster_create/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_cluster_delete/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_cluster_list/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_cluster_start/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_cluster_stop/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_completion/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_config/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_config_init/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_docgen/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_image/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_image_import/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_kubeconfig/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_kubeconfig_get/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_kubeconfig_merge/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_node/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_node_create/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_node_delete/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_node_list/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_node_start/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_node_stop/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_registry/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_registry_create/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_registry_delete/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_registry_list/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/commands/k3d_version/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/guides/calico/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/guides/cuda/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/guides/exposing_services/ - 2021-09-08 - daily - - - https://k3d.io/v4.4.8-docs.0/usage/guides/registries/ - 2021-09-08 - daily - - \ No newline at end of file diff --git a/usage/commands/index.html b/usage/commands/index.html deleted file mode 100644 index 28c7aaed..00000000 --- a/usage/commands/index.html +++ /dev/null @@ -1,1075 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Command Tree - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

Command Tree

-
k3d
-  --verbose  # GLOBAL: enable verbose (debug) logging (default: false)
-  --trace  # GLOBAL: enable super verbose logging (trace logging) (default: false)
-  --version  # show k3d and k3s version
-  -h, --help  # GLOBAL: show help text
-
-  cluster [CLUSTERNAME]  # default cluster name is 'k3s-default'
-    create
-      -a, --agents  # specify how many agent nodes you want to create (integer, default: 0)
-      --agents-memory # specify memory limit for agent containers/nodes (unit, e.g. 1g)
-      --api-port  # specify the port on which the cluster will be accessible (format '[HOST:]HOSTPORT', default: random)
-      -c, --config  # use a config file (format 'PATH')
-      -e, --env  # add environment variables to the nodes (quoted string, format: 'KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]', use flag multiple times)
-      --gpus  # [from docker CLI] add GPU devices to the node containers (string, e.g. 'all')
-      -i, --image  # specify which k3s image should be used for the nodes (string, default: 'docker.io/rancher/k3s:v1.20.0-k3s2', tag changes per build)
-      --k3s-agent-arg  # add additional arguments to the k3s agent (quoted string, use flag multiple times) (see https://rancher.com/docs/k3s/latest/en/installation/install-options/agent-config/#k3s-agent-cli-help)
-      --k3s-server-arg  # add additional arguments to the k3s server (quoted string, use flag multiple times) (see https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/#k3s-server-cli-help)
-      --kubeconfig-switch-context  # (implies --kubeconfig-update-default) automatically sets the current-context of your default kubeconfig to the new cluster's context (default: true)
-      --kubeconfig-update-default  # enable the automated update of the default kubeconfig with the details of the newly created cluster (also sets '--wait=true') (default: true)
-      -l, --label  # add (docker) labels to the node containers (format: 'KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]', use flag multiple times)
-      --network  # specify an existing (docker) network you want to connect to (string)
-      --no-hostip  # disable the automatic injection of the Host IP as 'host.k3d.internal' into the containers and CoreDNS (default: false)
-      --no-image-volume  # disable the creation of a volume for storing images (used for the 'k3d image import' command) (default: false)
-      --no-lb  # disable the creation of a load balancer in front of the server nodes (default: false)
-      --no-rollback  # disable the automatic rollback actions, if anything goes wrong (default: false)
-      -p, --port  # add some more port mappings (format: '[HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER]', use flag multiple times)
-      --registry-create  # create a new (docker) registry dedicated for this cluster (default: false)
-      --registry-use  # use an existing local (docker) registry with this cluster (string, use multiple times)
-      -s, --servers  # specify how many server nodes you want to create (integer, default: 1)
-      --servers-memory # specify memory limit for server containers/nodes (unit, e.g. 1g)
-      --token  # specify a cluster token (string, default: auto-generated)
-      --timeout  # specify a timeout, after which the cluster creation will be interrupted and changes rolled back (duration, e.g. '10s')
-      -v, --volume  # specify additional bind-mounts (format: '[SOURCE:]DEST[@NODEFILTER[;NODEFILTER...]]', use flag multiple times)
-      --wait  # enable waiting for all server nodes to be ready before returning (default: true)
-    start CLUSTERNAME  # start a (stopped) cluster
-      -a, --all  # start all clusters (default: false)
-      --wait  # wait for all servers and server-loadbalancer to be up before returning (default: true)
-      --timeout  # maximum waiting time for '--wait' before canceling/returning (duration, e.g. '10s')
-    stop CLUSTERNAME  # stop a cluster
-      -a, --all  # stop all clusters (default: false)
-    delete CLUSTERNAME  # delete an existing cluster
-      -a, --all  # delete all existing clusters (default: false)
-    list [CLUSTERNAME [CLUSTERNAME ...]]
-      --no-headers  # do not print headers (default: false)
-      --token  # show column with cluster tokens (default: false)
-      -o, --output  # format the output (format: 'json|yaml')
-  completion [bash | zsh | fish | (psh | powershell)]  # generate completion scripts for common shells
-  config
-    init  # write a default k3d config (as a starting point)
-      -f, --force  # force overwrite target file (default: false)
-      -o, --output  # file to write to (string, default "k3d-default.yaml")
-  help [COMMAND]  # show help text for any command
-  image
-    import [IMAGE | ARCHIVE [IMAGE | ARCHIVE ...]]  # Load one or more images from the local runtime environment or tar-archives into k3d clusters
-      -c, --cluster  # clusters to load the image into (string, use flag multiple times, default: k3s-default)
-      -k, --keep-tarball  # do not delete the image tarball from the shared volume after completion (default: false)
-  kubeconfig
-    get (CLUSTERNAME [CLUSTERNAME ...] | --all) # get kubeconfig from cluster(s) and write it to stdout
-      -a, --all  # get kubeconfigs from all clusters (default: false)
-    merge | write (CLUSTERNAME [CLUSTERNAME ...] | --all)  # get kubeconfig from cluster(s) and merge it/them into a (kubeconfig-)file
-      -a, --all  # get kubeconfigs from all clusters (default: false)
-      -s, --kubeconfig-switch-context  # switch current-context in kubeconfig to the new context (default: true)
-      -d, --kubeconfig-merge-default  # update the default kubeconfig (usually $KUBECONFIG or $HOME/.kube/config)
-      -o, --output  # specify the output file where the kubeconfig should be written to (string)
-      --overwrite  # [Careful!] forcefully overwrite the output file, ignoring existing contents (default: false)
-      -u, --update  # update conflicting fields in existing kubeconfig (default: true)
-  node
-    create NODENAME  # Create new nodes (and add them to existing clusters)
-      -c, --cluster  # specify the cluster that the node shall connect to (string, default: k3s-default)
-      -i, --image  # specify which k3s image should be used for the node(s) (string, default: 'docker.io/rancher/k3s:v1.20.0-k3s2', tag changes per build)
-      --replicas  # specify how many replicas you want to create with this spec (integer, default: 1)
-      --role  # specify the node role (string, format: 'agent|server', default: agent)
-      --timeout # specify a timeout duration, after which the node creation will be interrupted, if not done yet (duration, e.g. '10s')
-      --wait  # wait for the node to be up and running before returning (default: true)
-    start NODENAME  # start a (stopped) node
-    stop NODENAME # stop a node
-    delete NODENAME  # delete an existing node
-      -a, --all  # delete all existing nodes (default: false)
-      -r, --registries  # also delete registries, as a special type of node (default: false)
-    list NODENAME
-      --no-headers  # do not print headers (default: false)
-  registry
-    create REGISTRYNAME
-      -i, --image  # specify image used for the registry (string, default: "docker.io/library/registry:2")
-      -p, --port  # select host port to map to (format: '[HOST:]HOSTPORT', default: 'random')
-    delete REGISTRYNAME
-      -a, --all  # delete all existing registries (default: false)
-    list [NAME [NAME...]]
-      --no-headers  # disable table headers (default: false)
-  version  # show k3d and k3s version
-
- - - - -
-
- - - Last update: March 30, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d/index.html b/usage/commands/k3d/index.html deleted file mode 100644 index 9ed96b04..00000000 --- a/usage/commands/k3d/index.html +++ /dev/null @@ -1,1117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d

- -

k3d

-

https://k3d.io/ -> Run k3s in Docker!

-

Synopsis

-

https://k3d.io/ -k3d is a wrapper CLI that helps you to easily create k3s clusters inside docker. -Nodes of a k3d cluster are docker containers running a k3s image. -All Nodes of a k3d cluster are part of the same docker network.

-
k3d [flags]
-
-

Options

-
  -h, --help         help for k3d
-      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-      --version      Show k3d and default k3s version
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 20, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_cluster/index.html b/usage/commands/k3d_cluster/index.html deleted file mode 100644 index bdc7e978..00000000 --- a/usage/commands/k3d_cluster/index.html +++ /dev/null @@ -1,1127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d cluster - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d cluster

- -

k3d cluster

-

Manage cluster(s)

-

Synopsis

-

Manage cluster(s)

-
k3d cluster [flags]
-
-

Options

-
  -h, --help   help for cluster
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_cluster_create/index.html b/usage/commands/k3d_cluster_create/index.html deleted file mode 100644 index f7a1c14e..00000000 --- a/usage/commands/k3d_cluster_create/index.html +++ /dev/null @@ -1,1159 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d cluster create - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d cluster create

- -

k3d cluster create

-

Create a new cluster

-

Synopsis

-

Create a new k3s cluster with containerized nodes (k3s in docker). -Every cluster will consist of one or more containers: - - 1 (or more) server node container (k3s) - - (optionally) 1 loadbalancer container as the entrypoint to the cluster (nginx) - - (optionally) 1 (or more) agent node containers (k3s)

-
k3d cluster create NAME [flags]
-
-

Options

-
  -a, --agents int                                                     Specify how many agents you want to create
-      --agents-memory string                                           Memory limit imposed on the agents nodes [From docker]
-      --api-port [HOST:]HOSTPORT                                       Specify the Kubernetes API server port exposed on the LoadBalancer (Format: [HOST:]HOSTPORT)
-                                                                        - Example: `k3d cluster create --servers 3 --api-port 0.0.0.0:6550`
-  -c, --config string                                                  Path of a config file to use
-  -e, --env KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]                   Add environment variables to nodes (Format: KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]
-                                                                        - Example: `k3d cluster create --agents 2 -e "HTTP_PROXY=my.proxy.com@server[0]" -e "SOME_KEY=SOME_VAL@server[0]"`
-      --gpus string                                                    GPU devices to add to the cluster node containers ('all' to pass all GPUs) [From docker]
-  -h, --help                                                           help for create
-  -i, --image string                                                   Specify k3s image that you want to use for the nodes
-      --k3s-agent-arg k3s agent                                        Additional args passed to the k3s agent command on agent nodes (new flag per arg)
-      --k3s-server-arg k3s server                                      Additional args passed to the k3s server command on server nodes (new flag per arg)
-      --kubeconfig-switch-context                                      Directly switch the default kubeconfig's current-context to the new cluster's context (requires --kubeconfig-update-default) (default true)
-      --kubeconfig-update-default                                      Directly update the default kubeconfig with the new cluster's context (default true)
-  -l, --label KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]                 Add label to node container (Format: KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]
-                                                                        - Example: `k3d cluster create --agents 2 -l "my.label@agent[0,1]" -l "other.label=somevalue@server[0]"`
-      --network string                                                 Join an existing network
-      --no-hostip                                                      Disable the automatic injection of the Host IP as 'host.k3d.internal' into the containers and CoreDNS
-      --no-image-volume                                                Disable the creation of a volume for importing images
-      --no-lb                                                          Disable the creation of a LoadBalancer in front of the server nodes
-      --no-rollback                                                    Disable the automatic rollback actions, if anything goes wrong
-  -p, --port [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER]   Map ports from the node containers to the host (Format: [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER])
-                                                                        - Example: `k3d cluster create --agents 2 -p 8080:80@agent[0] -p 8081@agent[1]`
-      --registry-config string                                         Specify path to an extra registries.yaml file
-      --registry-create                                                Create a k3d-managed registry and connect it to the cluster
-      --registry-use stringArray                                       Connect to one or more k3d-managed registries running locally
-  -s, --servers int                                                    Specify how many servers you want to create
-      --servers-memory string                                          Memory limit imposed on the server nodes [From docker]
-      --subnet 172.28.0.0/16                                           [Experimental: IPAM] Define a subnet for the newly created container network (Example: 172.28.0.0/16)
-      --timeout duration                                               Rollback changes if cluster couldn't be created in specified duration.
-      --token string                                                   Specify a cluster token. By default, we generate one.
-  -v, --volume [SOURCE:]DEST[@NODEFILTER[;NODEFILTER...]]              Mount volumes into the nodes (Format: [SOURCE:]DEST[@NODEFILTER[;NODEFILTER...]]
-                                                                        - Example: `k3d cluster create --agents 2 -v /my/path@agent[0,1] -v /tmp/test:/tmp/other@server[0]`
-      --wait                                                           Wait for the server(s) to be ready before returning. Use '--timeout DURATION' to not wait forever. (default true)
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: July 9, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_cluster_delete/index.html b/usage/commands/k3d_cluster_delete/index.html deleted file mode 100644 index 55d1c282..00000000 --- a/usage/commands/k3d_cluster_delete/index.html +++ /dev/null @@ -1,1123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d cluster delete - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d cluster delete

- -

k3d cluster delete

-

Delete cluster(s).

-

Synopsis

-

Delete cluster(s).

-
k3d cluster delete [NAME [NAME ...] | --all] [flags]
-
-

Options

-
  -a, --all    Delete all existing clusters
-  -h, --help   help for delete
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_cluster_list/index.html b/usage/commands/k3d_cluster_list/index.html deleted file mode 100644 index 58c6b826..00000000 --- a/usage/commands/k3d_cluster_list/index.html +++ /dev/null @@ -1,1125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d cluster list - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d cluster list

- -

k3d cluster list

-

List cluster(s)

-

Synopsis

-

List cluster(s).

-
k3d cluster list [NAME [NAME...]] [flags]
-
-

Options

-
  -h, --help            help for list
-      --no-headers      Disable headers
-  -o, --output string   Output format. One of: json|yaml
-      --token           Print k3s cluster token
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_cluster_start/index.html b/usage/commands/k3d_cluster_start/index.html deleted file mode 100644 index 23858877..00000000 --- a/usage/commands/k3d_cluster_start/index.html +++ /dev/null @@ -1,1125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d cluster start - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d cluster start

- -

k3d cluster start

-

Start existing k3d cluster(s)

-

Synopsis

-

Start existing k3d cluster(s)

-
k3d cluster start [NAME [NAME...] | --all] [flags]
-
-

Options

-
  -a, --all                Start all existing clusters
-  -h, --help               help for start
-      --timeout duration   Maximum waiting time for '--wait' before canceling/returning.
-      --wait               Wait for the server(s) (and loadbalancer) to be ready before returning. (default true)
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_cluster_stop/index.html b/usage/commands/k3d_cluster_stop/index.html deleted file mode 100644 index 16425777..00000000 --- a/usage/commands/k3d_cluster_stop/index.html +++ /dev/null @@ -1,1123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d cluster stop - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d cluster stop

- -

k3d cluster stop

-

Stop existing k3d cluster(s)

-

Synopsis

-

Stop existing k3d cluster(s).

-
k3d cluster stop [NAME [NAME...] | --all] [flags]
-
-

Options

-
  -a, --all    Stop all existing clusters
-  -h, --help   help for stop
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_completion/index.html b/usage/commands/k3d_completion/index.html deleted file mode 100644 index b4671d3b..00000000 --- a/usage/commands/k3d_completion/index.html +++ /dev/null @@ -1,1122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d completion - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d completion

- -

k3d completion

-

Generate completion scripts for [bash, zsh, fish, powershell | psh]

-

Synopsis

-

Generate completion scripts for [bash, zsh, fish, powershell | psh]

-
k3d completion SHELL [flags]
-
-

Options

-
  -h, --help   help for completion
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

-
    -
  • k3d - https://k3d.io/ -> Run k3s in Docker!
  • -
- - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_config/index.html b/usage/commands/k3d_config/index.html deleted file mode 100644 index 963cfef7..00000000 --- a/usage/commands/k3d_config/index.html +++ /dev/null @@ -1,1123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d config - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d config

- -

k3d config

-

Work with config file(s)

-

Synopsis

-

Work with config file(s)

-
k3d config [flags]
-
-

Options

-
  -h, --help   help for config
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_config_init/index.html b/usage/commands/k3d_config_init/index.html deleted file mode 100644 index 6baf88ef..00000000 --- a/usage/commands/k3d_config_init/index.html +++ /dev/null @@ -1,1107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d config init - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d config init

- -

k3d config init

-
k3d config init [flags]
-
-

Options

-
  -f, --force           Force overwrite of target file
-  -h, --help            help for init
-  -o, --output string   Write a default k3d config (default "k3d-default.yaml")
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_docgen/index.html b/usage/commands/k3d_docgen/index.html deleted file mode 100644 index ec9ddd21..00000000 --- a/usage/commands/k3d_docgen/index.html +++ /dev/null @@ -1,1106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d docgen - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d docgen

- -

k3d docgen

-

Generate command docs

-
k3d docgen [flags]
-
-

Options

-
  -h, --help   help for docgen
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

-
    -
  • k3d - https://k3d.io/ -> Run k3s in Docker!
  • -
- - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_image/index.html b/usage/commands/k3d_image/index.html deleted file mode 100644 index 743a91bf..00000000 --- a/usage/commands/k3d_image/index.html +++ /dev/null @@ -1,1123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d image - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d image

- -

k3d image

-

Handle container images.

-

Synopsis

-

Handle container images.

-
k3d image [flags]
-
-

Options

-
  -h, --help   help for image
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

-
    -
  • k3d - https://k3d.io/ -> Run k3s in Docker!
  • -
  • k3d image import - Import image(s) from docker into k3d cluster(s).
  • -
- - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_image_import/index.html b/usage/commands/k3d_image_import/index.html deleted file mode 100644 index 42d55dea..00000000 --- a/usage/commands/k3d_image_import/index.html +++ /dev/null @@ -1,1133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d image import - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d image import

- -

k3d image import

-

Import image(s) from docker into k3d cluster(s).

-

Synopsis

-

Import image(s) from docker into k3d cluster(s).

-

If an IMAGE starts with the prefix ‘docker.io/’, then this prefix is stripped internally. -That is, ‘docker.io/rancher/k3d-tools:latest’ is treated as ‘rancher/k3d-tools:latest’.

-

If an IMAGE starts with the prefix ‘library/’ (or ‘docker.io/library/’), then this prefix is stripped internally. -That is, ‘library/busybox:latest’ (or ‘docker.io/library/busybox:latest’) are treated as ‘busybox:latest’.

-

If an IMAGE does not have a version tag, then ‘:latest’ is assumed. -That is, ‘rancher/k3d-tools’ is treated as ‘rancher/k3d-tools:latest’.

-

A file ARCHIVE always takes precedence. -So if a file ‘./rancher/k3d-tools’ exists, k3d will try to import it instead of the IMAGE of the same name.

-
k3d image import [IMAGE | ARCHIVE [IMAGE | ARCHIVE...]] [flags]
-
-

Options

-
  -c, --cluster stringArray   Select clusters to load the image to. (default [k3s-default])
-  -h, --help                  help for import
-  -k, --keep-tarball          Do not delete the tarball containing the saved images from the shared volume
-  -t, --keep-tools            Do not delete the tools node after import
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: July 9, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_kubeconfig/index.html b/usage/commands/k3d_kubeconfig/index.html deleted file mode 100644 index d91a25ae..00000000 --- a/usage/commands/k3d_kubeconfig/index.html +++ /dev/null @@ -1,1124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d kubeconfig - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d kubeconfig

- -

k3d kubeconfig

-

Manage kubeconfig(s)

-

Synopsis

-

Manage kubeconfig(s)

-
k3d kubeconfig [flags]
-
-

Options

-
  -h, --help   help for kubeconfig
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

-
    -
  • k3d - https://k3d.io/ -> Run k3s in Docker!
  • -
  • k3d kubeconfig get - Print kubeconfig(s) from cluster(s).
  • -
  • k3d kubeconfig merge - Write/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file.
  • -
- - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_kubeconfig_get/index.html b/usage/commands/k3d_kubeconfig_get/index.html deleted file mode 100644 index e8196a41..00000000 --- a/usage/commands/k3d_kubeconfig_get/index.html +++ /dev/null @@ -1,1123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d kubeconfig get - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d kubeconfig get

- -

k3d kubeconfig get

-

Print kubeconfig(s) from cluster(s).

-

Synopsis

-

Print kubeconfig(s) from cluster(s).

-
k3d kubeconfig get [CLUSTER [CLUSTER [...]] | --all] [flags]
-
-

Options

-
  -a, --all    Output kubeconfigs from all existing clusters
-  -h, --help   help for get
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_kubeconfig_merge/index.html b/usage/commands/k3d_kubeconfig_merge/index.html deleted file mode 100644 index b6d9e883..00000000 --- a/usage/commands/k3d_kubeconfig_merge/index.html +++ /dev/null @@ -1,1128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d kubeconfig merge - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d kubeconfig merge

- -

k3d kubeconfig merge

-

Write/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file.

-

Synopsis

-

Write/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file.

-
k3d kubeconfig merge [CLUSTER [CLUSTER [...]] | --all] [flags]
-
-

Options

-
  -a, --all                         Get kubeconfigs from all existing clusters
-  -h, --help                        help for merge
-  -d, --kubeconfig-merge-default    Merge into the default kubeconfig ($KUBECONFIG or /home/thklein/.kube/config)
-  -s, --kubeconfig-switch-context   Switch to new context (default true)
-  -o, --output string               Define output [ - | FILE ] (default from $KUBECONFIG or /home/thklein/.kube/config
-      --overwrite                   [Careful!] Overwrite existing file, ignoring its contents
-  -u, --update                      Update conflicting fields in existing kubeconfig (default true)
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_node/index.html b/usage/commands/k3d_node/index.html deleted file mode 100644 index aa3f927b..00000000 --- a/usage/commands/k3d_node/index.html +++ /dev/null @@ -1,1127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d node - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d node

- -

k3d node

-

Manage node(s)

-

Synopsis

-

Manage node(s)

-
k3d node [flags]
-
-

Options

-
  -h, --help   help for node
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_node_create/index.html b/usage/commands/k3d_node_create/index.html deleted file mode 100644 index 5abad80e..00000000 --- a/usage/commands/k3d_node_create/index.html +++ /dev/null @@ -1,1129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d node create - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d node create

- -

k3d node create

-

Create a new k3s node in docker

-

Synopsis

-

Create a new containerized k3s node (k3s in docker).

-
k3d node create NAME [flags]
-
-

Options

-
  -c, --cluster string     Select the cluster that the node shall connect to. (default "k3s-default")
-  -h, --help               help for create
-  -i, --image string       Specify k3s image used for the node(s) (default "docker.io/rancher/k3s:v1.20.0-k3s2")
-      --memory string      Memory limit imposed on the node [From docker]
-      --replicas int       Number of replicas of this node specification. (default 1)
-      --role string        Specify node role [server, agent] (default "agent")
-      --timeout duration   Maximum waiting time for '--wait' before canceling/returning.
-      --wait               Wait for the node(s) to be ready before returning.
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_node_delete/index.html b/usage/commands/k3d_node_delete/index.html deleted file mode 100644 index 35ac27fd..00000000 --- a/usage/commands/k3d_node_delete/index.html +++ /dev/null @@ -1,1124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d node delete - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d node delete

- -

k3d node delete

-

Delete node(s).

-

Synopsis

-

Delete node(s).

-
k3d node delete (NAME | --all) [flags]
-
-

Options

-
  -a, --all          Delete all existing nodes
-  -h, --help         help for delete
-  -r, --registries   Also delete registries
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_node_list/index.html b/usage/commands/k3d_node_list/index.html deleted file mode 100644 index 2e63f1bd..00000000 --- a/usage/commands/k3d_node_list/index.html +++ /dev/null @@ -1,1124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d node list - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d node list

- -

k3d node list

-

List node(s)

-

Synopsis

-

List node(s).

-
k3d node list [NAME [NAME...]] [flags]
-
-

Options

-
  -h, --help            help for list
-      --no-headers      Disable headers
-  -o, --output string   Output format. One of: json|yaml
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_node_start/index.html b/usage/commands/k3d_node_start/index.html deleted file mode 100644 index ea7a8e6d..00000000 --- a/usage/commands/k3d_node_start/index.html +++ /dev/null @@ -1,1122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d node start - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d node start

- -

k3d node start

-

Start an existing k3d node

-

Synopsis

-

Start an existing k3d node.

-
k3d node start NAME [flags]
-
-

Options

-
  -h, --help   help for start
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_node_stop/index.html b/usage/commands/k3d_node_stop/index.html deleted file mode 100644 index 6c12db52..00000000 --- a/usage/commands/k3d_node_stop/index.html +++ /dev/null @@ -1,1122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d node stop - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d node stop

- -

k3d node stop

-

Stop an existing k3d node

-

Synopsis

-

Stop an existing k3d node.

-
k3d node stop NAME [flags]
-
-

Options

-
  -h, --help   help for stop
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_registry/index.html b/usage/commands/k3d_registry/index.html deleted file mode 100644 index 2bfcd837..00000000 --- a/usage/commands/k3d_registry/index.html +++ /dev/null @@ -1,1125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d registry - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d registry

- -

k3d registry

-

Manage registry/registries

-

Synopsis

-

Manage registry/registries

-
k3d registry [flags]
-
-

Options

-
  -h, --help   help for registry
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_registry_create/index.html b/usage/commands/k3d_registry_create/index.html deleted file mode 100644 index 23ce9e96..00000000 --- a/usage/commands/k3d_registry_create/index.html +++ /dev/null @@ -1,1126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d registry create - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d registry create

- -

k3d registry create

-

Create a new registry

-

Synopsis

-

Create a new registry.

-
k3d registry create NAME [flags]
-
-

Options

-
  -h, --help                   help for create
-  -i, --image string           Specify image used for the registry (default "docker.io/library/registry:2")
-      --no-help                Disable the help text (How-To use the registry)
-  -p, --port [HOST:]HOSTPORT   Select which port the registry should be listening on on your machine (localhost) (Format: [HOST:]HOSTPORT)
-                                - Example: `k3d registry create --port 0.0.0.0:5111` (default "random")
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_registry_delete/index.html b/usage/commands/k3d_registry_delete/index.html deleted file mode 100644 index 1b9e1b8e..00000000 --- a/usage/commands/k3d_registry_delete/index.html +++ /dev/null @@ -1,1123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d registry delete - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d registry delete

- -

k3d registry delete

-

Delete registry/registries.

-

Synopsis

-

Delete registry/registries.

-
k3d registry delete (NAME | --all) [flags]
-
-

Options

-
  -a, --all    Delete all existing registries
-  -h, --help   help for delete
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_registry_list/index.html b/usage/commands/k3d_registry_list/index.html deleted file mode 100644 index 467b44a7..00000000 --- a/usage/commands/k3d_registry_list/index.html +++ /dev/null @@ -1,1124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d registry list - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d registry list

- -

k3d registry list

-

List registries

-

Synopsis

-

List registries.

-
k3d registry list [NAME [NAME...]] [flags]
-
-

Options

-
  -h, --help            help for list
-      --no-headers      Disable headers
-  -o, --output string   Output format. One of: json|yaml
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

- - - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/commands/k3d_version/index.html b/usage/commands/k3d_version/index.html deleted file mode 100644 index 61be216f..00000000 --- a/usage/commands/k3d_version/index.html +++ /dev/null @@ -1,1122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - K3d version - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

K3d version

- -

k3d version

-

Show k3d and default k3s version

-

Synopsis

-

Show k3d and default k3s version

-
k3d version [flags]
-
-

Options

-
  -h, --help   help for version
-
-

Options inherited from parent commands

-
      --timestamps   Enable Log timestamps
-      --trace        Enable super verbose output (trace logging)
-      --verbose      Enable verbose output (debug logging)
-
-

SEE ALSO

-
    -
  • k3d - https://k3d.io/ -> Run k3s in Docker!
  • -
- - - - -
-
- - - Last update: April 14, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/configfile/index.html b/usage/configfile/index.html deleted file mode 100644 index 30931bb3..00000000 --- a/usage/configfile/index.html +++ /dev/null @@ -1,1250 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Config File - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - Skip to content - - -
-
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

Config File

-

Introduction

-

As of k3d v4.0.0, released in January 2021, k3d ships with configuration file support for the k3d cluster create 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 ;) ).

-
-

Syntax & Semantics

-

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.

-
    -
  • --api-port is split up into a field named kubeAPI that has 3 different “child fields” (host, hostIP and hostPort)
  • -
  • k3d options are bundled in a scope named options.k3d, where --no-rollback is defined as options.k3d.disableRollback
  • -
  • repeatable flags (like --port) are reflected as YAML lists
  • -
-
-

Usage

-

Using a config file is as easy as putting it in a well-known place in your file system and then referencing it via flag:

-
    -
  • All options in config file: k3d cluster create --config /home/me/my-awesome-config.yaml (must be .yaml/.yml)
  • -
  • With CLI override (name): k3d cluster create somename --config /home/me/my-awesome-config.yaml
  • -
  • With CLI override (extra volume): k3d cluster create --config /home/me/my-awesome-config.yaml --volume '/some/path:/some:path@server[0]'
  • -
-

Required Fields

-

As of the time of writing this documentation, the config file only requires you to define two fields:

-
    -
  • apiVersion to match the version of the config file that you want to use (at this time it would be apiVersion: k3d.io/v1alpha2)
  • -
  • kind to define the kind of config file that you want to use (currently we only have the Simple config)
  • -
-

So this would be the minimal config file, which configures absolutely nothing:

-
apiVersion: k3d.io/v1alpha2
-kind: Simple
-
-

Config Options

-

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).

-
-

Validation via JSON-Schema

-

k3d uses a JSON-Schema to describe the expected format and fields of the configuration file.
-This schema is also used to validate a user-given config file.
-This JSON-Schema can be found in the specific config version sub-directory in the repository (e.g. here for v1alpha2) and could be used to lookup supported fields or by linters to validate the config file, e.g. in your code editor.

-
-

All Options: Example

-

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 settings, so here’s an example showing all of them as of the time of writing:

-
# k3d configuration file, saved as e.g. /home/me/myk3dcluster.yaml
-apiVersion: k3d.io/v1alpha2 # this will change in the future as we make everything more stable
-kind: Simple # internally, we also have a Cluster config, which is not yet available externally
-name: mycluster # name that you want to give to your cluster (will still be prefixed with `k3d-`)
-servers: 1 # same as `--servers 1`
-agents: 2 # same as `--agents 2`
-kubeAPI: # same as `--api-port myhost.my.domain:6445` (where the name would resolve to 127.0.0.1)
-  host: "myhost.my.domain" # important for the `server` setting in the kubeconfig
-  hostIP: "127.0.0.1" # where the Kubernetes API will be listening on
-  hostPort: "6445" # where the Kubernetes API listening port will be mapped to on your host system
-image: rancher/k3s:v1.20.4-k3s1 # same as `--image rancher/k3s:v1.20.4-k3s1`
-network: my-custom-net # same as `--network my-custom-net`
-token: superSecretToken # same as `--token superSecretToken`
-volumes: # repeatable flags are represented as YAML lists
-  - volume: /my/host/path:/path/in/node # same as `--volume '/my/host/path:/path/in/node@server[0];agent[*]'`
-    nodeFilters:
-      - server[0]
-      - agent[*]
-ports:
-  - port: 8080:80 # same as `--port '8080:80@loadbalancer'`
-    nodeFilters:
-      - loadbalancer
-labels:
-  - label: foo=bar # same as `--label 'foo=bar@agent[1]'`
-    nodeFilters:
-      - agent[1]
-env:
-  - envVar: bar=baz # same as `--env 'bar=baz@server[0]'`
-    nodeFilters:
-      - server[0]
-registries: # define how registries should be created or used
-  create: true # creates a default registry to be used with the cluster; same as `--registry-create`
-  use:
-    - k3d-myotherregistry:5000 # some other k3d-managed registry; same as `--registry-use 'k3d-myotherregistry:5000'`
-  config: | # define contents of the `registries.yaml` file (or reference a file); same as `--registry-config /path/to/config.yaml`
-    mirrors:
-      "my.company.registry":
-        endpoint:
-          - http://my.company.registry:5000
-options:
-  k3d: # k3d runtime settings
-    wait: true # wait for cluster to be usable before returining; same as `--wait` (default: true)
-    timeout: "60s" # wait timeout before aborting; same as `--timeout 60s`
-    disableLoadbalancer: false # same as `--no-lb`
-    disableImageVolume: false # same as `--no-image-volume`
-    disableRollback: false # same as `--no-Rollback`
-    disableHostIPInjection: false # same as `--no-hostip`
-  k3s: # options passed on to K3s itself
-    extraServerArgs: # additional arguments passed to the `k3s server` command; same as `--k3s-server-arg`
-      - --tls-san=my.host.domain
-    extraAgentArgs: [] # addditional arguments passed to the `k3s agent` command; same as `--k3s-agent-arg`
-  kubeconfig:
-    updateDefaultKubeconfig: true # add new cluster to your default Kubeconfig; same as `--kubeconfig-update-default` (default: true)
-    switchCurrentContext: true # also set current-context to the new cluster's context; same as `--kubeconfig-switch-context` (default: true)
-  runtime: # runtime (docker) specific options
-    gpuRequest: all # same as `--gpus all`
-
-

Config File vs. CLI Flags

-

k3d uses Cobra and Viper for CLI and general config handling respectively.
-This automatically introduces a “config option order of priority” (precedence order):

-
-

Config Precedence Order

-

Source: spf13/viper#why-viper

-
-

Internal Setting > CLI Flag > Environment Variable > Config File > (k/v store >) Defaults

-
-
-

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 kubeAPI (--api-port) settings.

-

References

- - - - - -
-
- - - Last update: June 9, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/guides/calico.yaml b/usage/guides/calico.yaml deleted file mode 100644 index 9de2ffd0..00000000 --- a/usage/guides/calico.yaml +++ /dev/null @@ -1,3755 +0,0 @@ ---- -# Source: calico/templates/calico-config.yaml -# This ConfigMap is used to configure a self-hosted Calico installation. -kind: ConfigMap -apiVersion: v1 -metadata: - name: calico-config - namespace: kube-system -data: - # Typha is disabled. - typha_service_name: "none" - # Configure the backend to use. - calico_backend: "bird" - # Configure the MTU to use for workload interfaces and tunnels. - # - If Wireguard is enabled, set to your network MTU - 60 - # - Otherwise, if VXLAN or BPF mode is enabled, set to your network MTU - 50 - # - Otherwise, if IPIP is enabled, set to your network MTU - 20 - # - Otherwise, if not using any encapsulation, set to your network MTU. - veth_mtu: "1440" - - # The CNI network configuration to install on each node. The special - # values in this config will be automatically populated. - cni_network_config: |- - { - "name": "k8s-pod-network", - "cniVersion": "0.3.1", - "plugins": [ - { - "type": "calico", - "log_level": "info", - "datastore_type": "kubernetes", - "nodename": "__KUBERNETES_NODE_NAME__", - "mtu": __CNI_MTU__, - "ipam": { - "type": "calico-ipam" - }, - "container_settings": { - "allow_ip_forwarding": true - }, - "policy": { - "type": "k8s" - }, - "kubernetes": { - "kubeconfig": "__KUBECONFIG_FILEPATH__" - } - }, - { - "type": "portmap", - "snat": true, - "capabilities": {"portMappings": true} - }, - { - "type": "bandwidth", - "capabilities": {"bandwidth": true} - } - ] - } - ---- -# Source: calico/templates/kdd-crds.yaml - - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: (devel) - creationTimestamp: null - name: bgpconfigurations.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: BGPConfiguration - listKind: BGPConfigurationList - plural: bgpconfigurations - singular: bgpconfiguration - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: BGPConfiguration contains the configuration for any BGP routing. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: BGPConfigurationSpec contains the values of the BGP configuration. - properties: - asNumber: - description: 'ASNumber is the default AS number used by a node. [Default: - 64512]' - format: int32 - type: integer - logSeverityScreen: - description: 'LogSeverityScreen is the log severity above which logs - are sent to the stdout. [Default: INFO]' - type: string - nodeToNodeMeshEnabled: - description: 'NodeToNodeMeshEnabled sets whether full node to node - BGP mesh is enabled. [Default: true]' - type: boolean - serviceClusterIPs: - description: ServiceClusterIPs are the CIDR blocks from which service - cluster IPs are allocated. If specified, Calico will advertise these - blocks, as well as any cluster IPs within them. - items: - description: ServiceClusterIPBlock represents a single whitelisted - CIDR block for ClusterIPs. - properties: - cidr: - type: string - type: object - type: array - serviceExternalIPs: - description: ServiceExternalIPs are the CIDR blocks for Kubernetes - Service External IPs. Kubernetes Service ExternalIPs will only be - advertised if they are within one of these blocks. - items: - description: ServiceExternalIPBlock represents a single whitelisted - CIDR External IP block. - properties: - cidr: - type: string - type: object - type: array - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: (devel) - creationTimestamp: null - name: bgppeers.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: BGPPeer - listKind: BGPPeerList - plural: bgppeers - singular: bgppeer - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: BGPPeerSpec contains the specification for a BGPPeer resource. - properties: - asNumber: - description: The AS Number of the peer. - format: int32 - type: integer - node: - description: The node name identifying the Calico node instance that - is peering with this peer. If this is not set, this represents a - global peer, i.e. a peer that peers with every node in the deployment. - type: string - nodeSelector: - description: Selector for the nodes that should have this peering. When - this is set, the Node field must be empty. - type: string - peerIP: - description: The IP address of the peer. - type: string - peerSelector: - description: Selector for the remote nodes to peer with. When this - is set, the PeerIP and ASNumber fields must be empty. For each - peering between the local node and selected remote nodes, we configure - an IPv4 peering if both ends have NodeBGPSpec.IPv4Address specified, - and an IPv6 peering if both ends have NodeBGPSpec.IPv6Address specified. The - remote AS number comes from the remote node’s NodeBGPSpec.ASNumber, - or the global default if that is not set. - type: string - required: - - asNumber - - peerIP - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: (devel) - creationTimestamp: null - name: blockaffinities.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: BlockAffinity - listKind: BlockAffinityList - plural: blockaffinities - singular: blockaffinity - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: BlockAffinitySpec contains the specification for a BlockAffinity - resource. - properties: - cidr: - type: string - deleted: - description: Deleted indicates that this block affinity is being deleted. - This field is a string for compatibility with older releases that - mistakenly treat this field as a string. - type: string - node: - type: string - state: - type: string - required: - - cidr - - deleted - - node - - state - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: (devel) - creationTimestamp: null - name: clusterinformations.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: ClusterInformation - listKind: ClusterInformationList - plural: clusterinformations - singular: clusterinformation - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: ClusterInformation contains the cluster specific information. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: ClusterInformationSpec contains the values of describing - the cluster. - properties: - calicoVersion: - description: CalicoVersion is the version of Calico that the cluster - is running - type: string - clusterGUID: - description: ClusterGUID is the GUID of the cluster - type: string - clusterType: - description: ClusterType describes the type of the cluster - type: string - datastoreReady: - description: DatastoreReady is used during significant datastore migrations - to signal to components such as Felix that it should wait before - accessing the datastore. - type: boolean - variant: - description: Variant declares which variant of Calico should be active. - type: string - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: (devel) - creationTimestamp: null - name: felixconfigurations.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: FelixConfiguration - listKind: FelixConfigurationList - plural: felixconfigurations - singular: felixconfiguration - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: Felix Configuration contains the configuration for Felix. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: FelixConfigurationSpec contains the values of the Felix configuration. - properties: - bpfConnectTimeLoadBalancingEnabled: - description: 'BPFConnectTimeLoadBalancingEnabled when in BPF mode, - controls whether Felix installs the connection-time load balancer. The - connect-time load balancer is required for the host to be able to - reach Kubernetes services and it improves the performance of pod-to-service - connections. The only reason to disable it is for debugging purposes. [Default: - true]' - type: boolean - bpfDataIfacePattern: - description: 'BPFDataIfacePattern is a regular expression that controls - which interfaces Felix should attach BPF programs to in order to - catch traffic to/from the network. This needs to match the interfaces - that Calico workload traffic flows over as well as any interfaces - that handle incoming traffic to nodeports and services from outside - the cluster. It should not match the workload interfaces (usually - named cali...). [Default: ^(en.*|eth.*|tunl0$)]' - type: string - bpfDisableUnprivileged: - description: 'BPFDisableUnprivileged, if enabled, Felix sets the kernel.unprivileged_bpf_disabled - sysctl to disable unprivileged use of BPF. This ensures that unprivileged - users cannot access Calico''s BPF maps and cannot insert their own - BPF programs to interfere with Calico''s. [Default: true]' - type: boolean - bpfEnabled: - description: 'BPFEnabled, if enabled Felix will use the BPF dataplane. - [Default: false]' - type: boolean - bpfExternalServiceMode: - description: 'BPFExternalServiceMode in BPF mode, controls how connections - from outside the cluster to services (node ports and cluster IPs) - are forwarded to remote workloads. If set to "Tunnel" then both - request and response traffic is tunneled to the remote node. If - set to "DSR", the request traffic is tunneled but the response traffic - is sent directly from the remote node. In "DSR" mode, the remote - node appears to use the IP of the ingress node; this requires a - permissive L2 network. [Default: Tunnel]' - type: string - bpfKubeProxyEndpointSlicesEnabled: - description: BPFKubeProxyEndpointSlicesEnabled in BPF mode, controls - whether Felix's embedded kube-proxy accepts EndpointSlices or not. - type: boolean - bpfKubeProxyIptablesCleanupEnabled: - description: 'BPFKubeProxyIptablesCleanupEnabled, if enabled in BPF - mode, Felix will proactively clean up the upstream Kubernetes kube-proxy''s - iptables chains. Should only be enabled if kube-proxy is not running. [Default: - true]' - type: boolean - bpfKubeProxyMinSyncPeriod: - description: 'BPFKubeProxyMinSyncPeriod, in BPF mode, controls the - minimum time between updates to the dataplane for Felix''s embedded - kube-proxy. Lower values give reduced set-up latency. Higher values - reduce Felix CPU usage by batching up more work. [Default: 1s]' - type: string - bpfLogLevel: - description: 'BPFLogLevel controls the log level of the BPF programs - when in BPF dataplane mode. One of "Off", "Info", or "Debug". The - logs are emitted to the BPF trace pipe, accessible with the command - `tc exec bpf debug`. [Default: Off].' - type: string - chainInsertMode: - description: 'ChainInsertMode controls whether Felix hooks the kernel’s - top-level iptables chains by inserting a rule at the top of the - chain or by appending a rule at the bottom. insert is the safe default - since it prevents Calico’s rules from being bypassed. If you switch - to append mode, be sure that the other rules in the chains signal - acceptance by falling through to the Calico rules, otherwise the - Calico policy will be bypassed. [Default: insert]' - type: string - dataplaneDriver: - type: string - debugDisableLogDropping: - type: boolean - debugMemoryProfilePath: - type: string - debugSimulateCalcGraphHangAfter: - type: string - debugSimulateDataplaneHangAfter: - type: string - defaultEndpointToHostAction: - description: 'DefaultEndpointToHostAction controls what happens to - traffic that goes from a workload endpoint to the host itself (after - the traffic hits the endpoint egress policy). By default Calico - blocks traffic from workload endpoints to the host itself with an - iptables “DROP” action. If you want to allow some or all traffic - from endpoint to host, set this parameter to RETURN or ACCEPT. Use - RETURN if you have your own rules in the iptables “INPUT” chain; - Calico will insert its rules at the top of that chain, then “RETURN” - packets to the “INPUT” chain once it has completed processing workload - endpoint egress policy. Use ACCEPT to unconditionally accept packets - from workloads after processing workload endpoint egress policy. - [Default: Drop]' - type: string - deviceRouteProtocol: - description: This defines the route protocol added to programmed device - routes, by default this will be RTPROT_BOOT when left blank. - type: integer - deviceRouteSourceAddress: - description: This is the source address to use on programmed device - routes. By default the source address is left blank, leaving the - kernel to choose the source address used. - type: string - disableConntrackInvalidCheck: - type: boolean - endpointReportingDelay: - type: string - endpointReportingEnabled: - type: boolean - externalNodesList: - description: ExternalNodesCIDRList is a list of CIDR's of external-non-calico-nodes - which may source tunnel traffic and have the tunneled traffic be - accepted at calico nodes. - items: - type: string - type: array - failsafeInboundHostPorts: - description: 'FailsafeInboundHostPorts is a comma-delimited list of - UDP/TCP ports that Felix will allow incoming traffic to host endpoints - on irrespective of the security policy. This is useful to avoid - accidentally cutting off a host with incorrect configuration. Each - port should be specified as tcp: or udp:. - For back-compatibility, if the protocol is not specified, it defaults - to “tcp”. To disable all inbound host ports, use the value none. - The default value allows ssh access and DHCP. [Default: tcp:22, - udp:68, tcp:179, tcp:2379, tcp:2380, tcp:6443, tcp:6666, tcp:6667]' - items: - description: ProtoPort is combination of protocol and port, both - must be specified. - properties: - port: - type: integer - protocol: - type: string - required: - - port - - protocol - type: object - type: array - failsafeOutboundHostPorts: - description: 'FailsafeOutboundHostPorts is a comma-delimited list - of UDP/TCP ports that Felix will allow outgoing traffic from host - endpoints to irrespective of the security policy. This is useful - to avoid accidentally cutting off a host with incorrect configuration. - Each port should be specified as tcp: or udp:. - For back-compatibility, if the protocol is not specified, it defaults - to “tcp”. To disable all outbound host ports, use the value none. - The default value opens etcd’s standard ports to ensure that Felix - does not get cut off from etcd as well as allowing DHCP and DNS. - [Default: tcp:179, tcp:2379, tcp:2380, tcp:6443, tcp:6666, tcp:6667, - udp:53, udp:67]' - items: - description: ProtoPort is combination of protocol and port, both - must be specified. - properties: - port: - type: integer - protocol: - type: string - required: - - port - - protocol - type: object - type: array - genericXDPEnabled: - description: 'GenericXDPEnabled enables Generic XDP so network cards - that don''t support XDP offload or driver modes can use XDP. This - is not recommended since it doesn''t provide better performance - than iptables. [Default: false]' - type: boolean - healthEnabled: - type: boolean - healthHost: - type: string - healthPort: - type: integer - interfaceExclude: - description: 'InterfaceExclude is a comma-separated list of interfaces - that Felix should exclude when monitoring for host endpoints. The - default value ensures that Felix ignores Kubernetes'' IPVS dummy - interface, which is used internally by kube-proxy. If you want to - exclude multiple interface names using a single value, the list - supports regular expressions. For regular expressions you must wrap - the value with ''/''. For example having values ''/^kube/,veth1'' - will exclude all interfaces that begin with ''kube'' and also the - interface ''veth1''. [Default: kube-ipvs0]' - type: string - interfacePrefix: - description: 'InterfacePrefix is the interface name prefix that identifies - workload endpoints and so distinguishes them from host endpoint - interfaces. Note: in environments other than bare metal, the orchestrators - configure this appropriately. For example our Kubernetes and Docker - integrations set the ‘cali’ value, and our OpenStack integration - sets the ‘tap’ value. [Default: cali]' - type: string - ipipEnabled: - type: boolean - ipipMTU: - description: 'IPIPMTU is the MTU to set on the tunnel device. See - Configuring MTU [Default: 1440]' - type: integer - ipsetsRefreshInterval: - description: 'IpsetsRefreshInterval is the period at which Felix re-checks - all iptables state to ensure that no other process has accidentally - broken Calico’s rules. Set to 0 to disable iptables refresh. [Default: - 90s]' - type: string - iptablesBackend: - description: IptablesBackend specifies which backend of iptables will - be used. The default is legacy. - type: string - iptablesFilterAllowAction: - type: string - iptablesLockFilePath: - description: 'IptablesLockFilePath is the location of the iptables - lock file. You may need to change this if the lock file is not in - its standard location (for example if you have mapped it into Felix’s - container at a different path). [Default: /run/xtables.lock]' - type: string - iptablesLockProbeInterval: - description: 'IptablesLockProbeInterval is the time that Felix will - wait between attempts to acquire the iptables lock if it is not - available. Lower values make Felix more responsive when the lock - is contended, but use more CPU. [Default: 50ms]' - type: string - iptablesLockTimeout: - description: 'IptablesLockTimeout is the time that Felix will wait - for the iptables lock, or 0, to disable. To use this feature, Felix - must share the iptables lock file with all other processes that - also take the lock. When running Felix inside a container, this - requires the /run directory of the host to be mounted into the calico/node - or calico/felix container. [Default: 0s disabled]' - type: string - iptablesMangleAllowAction: - type: string - iptablesMarkMask: - description: 'IptablesMarkMask is the mask that Felix selects its - IPTables Mark bits from. Should be a 32 bit hexadecimal number with - at least 8 bits set, none of which clash with any other mark bits - in use on the system. [Default: 0xff000000]' - format: int32 - type: integer - iptablesNATOutgoingInterfaceFilter: - type: string - iptablesPostWriteCheckInterval: - description: 'IptablesPostWriteCheckInterval is the period after Felix - has done a write to the dataplane that it schedules an extra read - back in order to check the write was not clobbered by another process. - This should only occur if another application on the system doesn’t - respect the iptables lock. [Default: 1s]' - type: string - iptablesRefreshInterval: - description: 'IptablesRefreshInterval is the period at which Felix - re-checks the IP sets in the dataplane to ensure that no other process - has accidentally broken Calico’s rules. Set to 0 to disable IP sets - refresh. Note: the default for this value is lower than the other - refresh intervals as a workaround for a Linux kernel bug that was - fixed in kernel version 4.11. If you are using v4.11 or greater - you may want to set this to, a higher value to reduce Felix CPU - usage. [Default: 10s]' - type: string - ipv6Support: - type: boolean - kubeNodePortRanges: - description: 'KubeNodePortRanges holds list of port ranges used for - service node ports. Only used if felix detects kube-proxy running - in ipvs mode. Felix uses these ranges to separate host and workload - traffic. [Default: 30000:32767].' - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - logFilePath: - description: 'LogFilePath is the full path to the Felix log. Set to - none to disable file logging. [Default: /var/log/calico/felix.log]' - type: string - logPrefix: - description: 'LogPrefix is the log prefix that Felix uses when rendering - LOG rules. [Default: calico-packet]' - type: string - logSeverityFile: - description: 'LogSeverityFile is the log severity above which logs - are sent to the log file. [Default: Info]' - type: string - logSeverityScreen: - description: 'LogSeverityScreen is the log severity above which logs - are sent to the stdout. [Default: Info]' - type: string - logSeveritySys: - description: 'LogSeveritySys is the log severity above which logs - are sent to the syslog. Set to None for no logging to syslog. [Default: - Info]' - type: string - maxIpsetSize: - type: integer - metadataAddr: - description: 'MetadataAddr is the IP address or domain name of the - server that can answer VM queries for cloud-init metadata. In OpenStack, - this corresponds to the machine running nova-api (or in Ubuntu, - nova-api-metadata). A value of none (case insensitive) means that - Felix should not set up any NAT rule for the metadata path. [Default: - 127.0.0.1]' - type: string - metadataPort: - description: 'MetadataPort is the port of the metadata server. This, - combined with global.MetadataAddr (if not ‘None’), is used to set - up a NAT rule, from 169.254.169.254:80 to MetadataAddr:MetadataPort. - In most cases this should not need to be changed [Default: 8775].' - type: integer - natOutgoingAddress: - description: NATOutgoingAddress specifies an address to use when performing - source NAT for traffic in a natOutgoing pool that is leaving the - network. By default the address used is an address on the interface - the traffic is leaving on (ie it uses the iptables MASQUERADE target) - type: string - natPortRange: - anyOf: - - type: integer - - type: string - description: NATPortRange specifies the range of ports that is used - for port mapping when doing outgoing NAT. When unset the default - behavior of the network stack is used. - pattern: ^.* - x-kubernetes-int-or-string: true - netlinkTimeout: - type: string - openstackRegion: - description: 'OpenstackRegion is the name of the region that a particular - Felix belongs to. In a multi-region Calico/OpenStack deployment, - this must be configured somehow for each Felix (here in the datamodel, - or in felix.cfg or the environment on each compute node), and must - match the [calico] openstack_region value configured in neutron.conf - on each node. [Default: Empty]' - type: string - policySyncPathPrefix: - description: 'PolicySyncPathPrefix is used to by Felix to communicate - policy changes to external services, like Application layer policy. - [Default: Empty]' - type: string - prometheusGoMetricsEnabled: - description: 'PrometheusGoMetricsEnabled disables Go runtime metrics - collection, which the Prometheus client does by default, when set - to false. This reduces the number of metrics reported, reducing - Prometheus load. [Default: true]' - type: boolean - prometheusMetricsEnabled: - description: 'PrometheusMetricsEnabled enables the Prometheus metrics - server in Felix if set to true. [Default: false]' - type: boolean - prometheusMetricsHost: - description: 'PrometheusMetricsHost is the host that the Prometheus - metrics server should bind to. [Default: empty]' - type: string - prometheusMetricsPort: - description: 'PrometheusMetricsPort is the TCP port that the Prometheus - metrics server should bind to. [Default: 9091]' - type: integer - prometheusProcessMetricsEnabled: - description: 'PrometheusProcessMetricsEnabled disables process metrics - collection, which the Prometheus client does by default, when set - to false. This reduces the number of metrics reported, reducing - Prometheus load. [Default: true]' - type: boolean - removeExternalRoutes: - description: Whether or not to remove device routes that have not - been programmed by Felix. Disabling this will allow external applications - to also add device routes. This is enabled by default which means - we will remove externally added routes. - type: boolean - reportingInterval: - description: 'ReportingInterval is the interval at which Felix reports - its status into the datastore or 0 to disable. Must be non-zero - in OpenStack deployments. [Default: 30s]' - type: string - reportingTTL: - description: 'ReportingTTL is the time-to-live setting for process-wide - status reports. [Default: 90s]' - type: string - routeRefreshInterval: - description: 'RouterefreshInterval is the period at which Felix re-checks - the routes in the dataplane to ensure that no other process has - accidentally broken Calico’s rules. Set to 0 to disable route refresh. - [Default: 90s]' - type: string - routeSource: - description: 'RouteSource configures where Felix gets its routing - information. - WorkloadIPs: use workload endpoints to construct - routes. - CalicoIPAM: the default - use IPAM data to construct routes.' - type: string - routeTableRange: - description: Calico programs additional Linux route tables for various - purposes. RouteTableRange specifies the indices of the route tables - that Calico should use. - properties: - max: - type: integer - min: - type: integer - required: - - max - - min - type: object - sidecarAccelerationEnabled: - description: 'SidecarAccelerationEnabled enables experimental sidecar - acceleration [Default: false]' - type: boolean - usageReportingEnabled: - description: 'UsageReportingEnabled reports anonymous Calico version - number and cluster size to projectcalico.org. Logs warnings returned - by the usage server. For example, if a significant security vulnerability - has been discovered in the version of Calico being used. [Default: - true]' - type: boolean - usageReportingInitialDelay: - description: 'UsageReportingInitialDelay controls the minimum delay - before Felix makes a report. [Default: 300s]' - type: string - usageReportingInterval: - description: 'UsageReportingInterval controls the interval at which - Felix makes reports. [Default: 86400s]' - type: string - useInternalDataplaneDriver: - type: boolean - vxlanEnabled: - type: boolean - vxlanMTU: - description: 'VXLANMTU is the MTU to set on the tunnel device. See - Configuring MTU [Default: 1440]' - type: integer - vxlanPort: - type: integer - vxlanVNI: - type: integer - wireguardEnabled: - description: 'WireguardEnabled controls whether Wireguard is enabled. - [Default: false]' - type: boolean - wireguardInterfaceName: - description: 'WireguardInterfaceName specifies the name to use for - the Wireguard interface. [Default: wg.calico]' - type: string - wireguardListeningPort: - description: 'WireguardListeningPort controls the listening port used - by Wireguard. [Default: 51820]' - type: integer - wireguardMTU: - description: 'WireguardMTU controls the MTU on the Wireguard interface. - See Configuring MTU [Default: 1420]' - type: integer - wireguardRoutingRulePriority: - description: 'WireguardRoutingRulePriority controls the priority value - to use for the Wireguard routing rule. [Default: 99]' - type: integer - xdpEnabled: - description: 'XDPEnabled enables XDP acceleration for suitable untracked - incoming deny rules. [Default: true]' - type: boolean - xdpRefreshInterval: - description: 'XDPRefreshInterval is the period at which Felix re-checks - all XDP state to ensure that no other process has accidentally broken - Calico''s BPF maps or attached programs. Set to 0 to disable XDP - refresh. [Default: 90s]' - type: string - required: - - bpfLogLevel - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: (devel) - creationTimestamp: null - name: globalnetworkpolicies.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: GlobalNetworkPolicy - listKind: GlobalNetworkPolicyList - plural: globalnetworkpolicies - singular: globalnetworkpolicy - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - applyOnForward: - description: ApplyOnForward indicates to apply the rules in this policy - on forward traffic. - type: boolean - doNotTrack: - description: DoNotTrack indicates whether packets matched by the rules - in this policy should go through the data plane's connection tracking, - such as Linux conntrack. If True, the rules in this policy are - applied before any data plane connection tracking, and packets allowed - by this policy are marked as not to be tracked. - type: boolean - egress: - description: The ordered set of egress rules. Each rule contains - a set of packet match criteria and a corresponding action to apply. - items: - description: "A Rule encapsulates a set of match criteria and an - action. Both selector-based security Policy and security Profiles - reference rules - separated out as a list of rules for both ingress - and egress packet matching. \n Each positive match criteria has - a negated version, prefixed with ”Not”. All the match criteria - within a rule must be satisfied for a packet to match. A single - rule can contain the positive and negative version of a match - and both must be satisfied for the rule to match." - properties: - action: - type: string - destination: - description: Destination contains the match criteria that apply - to destination entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - http: - description: HTTP contains match criteria that apply to HTTP - requests. - properties: - methods: - description: Methods is an optional field that restricts - the rule to apply only to HTTP requests that use one of - the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple - methods are OR'd together. - items: - type: string - type: array - paths: - description: 'Paths is an optional field that restricts - the rule to apply to HTTP requests that use one of the - listed HTTP Paths. Multiple paths are OR''d together. - e.g: - exact: /foo - prefix: /bar NOTE: Each entry may - ONLY specify either a `exact` or a `prefix` match. The - validator will check for it.' - items: - description: 'HTTPPath specifies an HTTP path to match. - It may be either of the form: exact: : which matches - the path exactly or prefix: : which matches - the path prefix' - properties: - exact: - type: string - prefix: - type: string - type: object - type: array - type: object - icmp: - description: ICMP is an optional field that restricts the rule - to apply to a specific type and code of ICMP traffic. This - should only be specified if the Protocol field is set to "ICMP" - or "ICMPv6". - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - ipVersion: - description: IPVersion is an optional field that restricts the - rule to only match a specific IP version. - type: integer - metadata: - description: Metadata contains additional information for this - rule - properties: - annotations: - additionalProperties: - type: string - description: Annotations is a set of key value pairs that - give extra information about the rule - type: object - type: object - notICMP: - description: NotICMP is the negated version of the ICMP field. - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - notProtocol: - anyOf: - - type: integer - - type: string - description: NotProtocol is the negated version of the Protocol - field. - pattern: ^.* - x-kubernetes-int-or-string: true - protocol: - anyOf: - - type: integer - - type: string - description: "Protocol is an optional field that restricts the - rule to only apply to traffic of a specific IP protocol. Required - if any of the EntityRules contain Ports (because ports only - apply to certain protocols). \n Must be one of these string - values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\", - \"UDPLite\" or an integer in the range 1-255." - pattern: ^.* - x-kubernetes-int-or-string: true - source: - description: Source contains the match criteria that apply to - source entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - required: - - action - type: object - type: array - ingress: - description: The ordered set of ingress rules. Each rule contains - a set of packet match criteria and a corresponding action to apply. - items: - description: "A Rule encapsulates a set of match criteria and an - action. Both selector-based security Policy and security Profiles - reference rules - separated out as a list of rules for both ingress - and egress packet matching. \n Each positive match criteria has - a negated version, prefixed with ”Not”. All the match criteria - within a rule must be satisfied for a packet to match. A single - rule can contain the positive and negative version of a match - and both must be satisfied for the rule to match." - properties: - action: - type: string - destination: - description: Destination contains the match criteria that apply - to destination entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - http: - description: HTTP contains match criteria that apply to HTTP - requests. - properties: - methods: - description: Methods is an optional field that restricts - the rule to apply only to HTTP requests that use one of - the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple - methods are OR'd together. - items: - type: string - type: array - paths: - description: 'Paths is an optional field that restricts - the rule to apply to HTTP requests that use one of the - listed HTTP Paths. Multiple paths are OR''d together. - e.g: - exact: /foo - prefix: /bar NOTE: Each entry may - ONLY specify either a `exact` or a `prefix` match. The - validator will check for it.' - items: - description: 'HTTPPath specifies an HTTP path to match. - It may be either of the form: exact: : which matches - the path exactly or prefix: : which matches - the path prefix' - properties: - exact: - type: string - prefix: - type: string - type: object - type: array - type: object - icmp: - description: ICMP is an optional field that restricts the rule - to apply to a specific type and code of ICMP traffic. This - should only be specified if the Protocol field is set to "ICMP" - or "ICMPv6". - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - ipVersion: - description: IPVersion is an optional field that restricts the - rule to only match a specific IP version. - type: integer - metadata: - description: Metadata contains additional information for this - rule - properties: - annotations: - additionalProperties: - type: string - description: Annotations is a set of key value pairs that - give extra information about the rule - type: object - type: object - notICMP: - description: NotICMP is the negated version of the ICMP field. - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - notProtocol: - anyOf: - - type: integer - - type: string - description: NotProtocol is the negated version of the Protocol - field. - pattern: ^.* - x-kubernetes-int-or-string: true - protocol: - anyOf: - - type: integer - - type: string - description: "Protocol is an optional field that restricts the - rule to only apply to traffic of a specific IP protocol. Required - if any of the EntityRules contain Ports (because ports only - apply to certain protocols). \n Must be one of these string - values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\", - \"UDPLite\" or an integer in the range 1-255." - pattern: ^.* - x-kubernetes-int-or-string: true - source: - description: Source contains the match criteria that apply to - source entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - required: - - action - type: object - type: array - namespaceSelector: - description: NamespaceSelector is an optional field for an expression - used to select a pod based on namespaces. - type: string - order: - description: Order is an optional field that specifies the order in - which the policy is applied. Policies with higher "order" are applied - after those with lower order. If the order is omitted, it may be - considered to be "infinite" - i.e. the policy will be applied last. Policies - with identical order will be applied in alphanumerical order based - on the Policy "Name". - type: number - preDNAT: - description: PreDNAT indicates to apply the rules in this policy before - any DNAT. - type: boolean - selector: - description: "The selector is an expression used to pick pick out - the endpoints that the policy should be applied to. \n Selector - expressions follow this syntax: \n \tlabel == \"string_literal\" - \ -> comparison, e.g. my_label == \"foo bar\" \tlabel != \"string_literal\" - \ -> not equal; also matches if label is not present \tlabel in - { \"a\", \"b\", \"c\", ... } -> true if the value of label X is - one of \"a\", \"b\", \"c\" \tlabel not in { \"a\", \"b\", \"c\", - ... } -> true if the value of label X is not one of \"a\", \"b\", - \"c\" \thas(label_name) -> True if that label is present \t! expr - -> negation of expr \texpr && expr -> Short-circuit and \texpr - || expr -> Short-circuit or \t( expr ) -> parens for grouping \tall() - or the empty selector -> matches all endpoints. \n Label names are - allowed to contain alphanumerics, -, _ and /. String literals are - more permissive but they do not support escape characters. \n Examples - (with made-up labels): \n \ttype == \"webserver\" && deployment - == \"prod\" \ttype in {\"frontend\", \"backend\"} \tdeployment != - \"dev\" \t! has(label_name)" - type: string - serviceAccountSelector: - description: ServiceAccountSelector is an optional field for an expression - used to select a pod based on service accounts. - type: string - types: - description: "Types indicates whether this policy applies to ingress, - or to egress, or to both. When not explicitly specified (and so - the value on creation is empty or nil), Calico defaults Types according - to what Ingress and Egress rules are present in the policy. The - default is: \n - [ PolicyTypeIngress ], if there are no Egress rules - (including the case where there are also no Ingress rules) \n - - [ PolicyTypeEgress ], if there are Egress rules but no Ingress - rules \n - [ PolicyTypeIngress, PolicyTypeEgress ], if there are - both Ingress and Egress rules. \n When the policy is read back again, - Types will always be one of these values, never empty or nil." - items: - description: PolicyType enumerates the possible values of the PolicySpec - Types field. - type: string - type: array - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: (devel) - creationTimestamp: null - name: globalnetworksets.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: GlobalNetworkSet - listKind: GlobalNetworkSetList - plural: globalnetworksets - singular: globalnetworkset - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: GlobalNetworkSet contains a set of arbitrary IP sub-networks/CIDRs - that share labels to allow rules to refer to them via selectors. The labels - of GlobalNetworkSet are not namespaced. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: GlobalNetworkSetSpec contains the specification for a NetworkSet - resource. - properties: - nets: - description: The list of IP networks that belong to this set. - items: - type: string - type: array - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: (devel) - creationTimestamp: null - name: hostendpoints.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: HostEndpoint - listKind: HostEndpointList - plural: hostendpoints - singular: hostendpoint - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: HostEndpointSpec contains the specification for a HostEndpoint - resource. - properties: - expectedIPs: - description: "The expected IP addresses (IPv4 and IPv6) of the endpoint. - If \"InterfaceName\" is not present, Calico will look for an interface - matching any of the IPs in the list and apply policy to that. Note: - \tWhen using the selector match criteria in an ingress or egress - security Policy \tor Profile, Calico converts the selector into - a set of IP addresses. For host \tendpoints, the ExpectedIPs field - is used for that purpose. (If only the interface \tname is specified, - Calico does not learn the IPs of the interface for use in match - \tcriteria.)" - items: - type: string - type: array - interfaceName: - description: "Either \"*\", or the name of a specific Linux interface - to apply policy to; or empty. \"*\" indicates that this HostEndpoint - governs all traffic to, from or through the default network namespace - of the host named by the \"Node\" field; entering and leaving that - namespace via any interface, including those from/to non-host-networked - local workloads. \n If InterfaceName is not \"*\", this HostEndpoint - only governs traffic that enters or leaves the host through the - specific interface named by InterfaceName, or - when InterfaceName - is empty - through the specific interface that has one of the IPs - in ExpectedIPs. Therefore, when InterfaceName is empty, at least - one expected IP must be specified. Only external interfaces (such - as “eth0”) are supported here; it isn't possible for a HostEndpoint - to protect traffic through a specific local workload interface. - \n Note: Only some kinds of policy are implemented for \"*\" HostEndpoints; - initially just pre-DNAT policy. Please check Calico documentation - for the latest position." - type: string - node: - description: The node name identifying the Calico node instance. - type: string - ports: - description: Ports contains the endpoint's named ports, which may - be referenced in security policy rules. - items: - properties: - name: - type: string - port: - type: integer - protocol: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - required: - - name - - port - - protocol - type: object - type: array - profiles: - description: A list of identifiers of security Profile objects that - apply to this endpoint. Each profile is applied in the order that - they appear in this list. Profile rules are applied after the selector-based - security policy. - items: - type: string - type: array - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: (devel) - creationTimestamp: null - name: ipamblocks.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: IPAMBlock - listKind: IPAMBlockList - plural: ipamblocks - singular: ipamblock - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: IPAMBlockSpec contains the specification for an IPAMBlock - resource. - properties: - affinity: - type: string - allocations: - items: - type: integer - # TODO: This nullable is manually added in. We should update controller-gen - # to handle []*int properly itself. - nullable: true - type: array - attributes: - items: - properties: - handle_id: - type: string - secondary: - additionalProperties: - type: string - type: object - type: object - type: array - cidr: - type: string - deleted: - type: boolean - strictAffinity: - type: boolean - unallocated: - items: - type: integer - type: array - required: - - allocations - - attributes - - cidr - - deleted - - strictAffinity - - unallocated - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: (devel) - creationTimestamp: null - name: ipamconfigs.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: IPAMConfig - listKind: IPAMConfigList - plural: ipamconfigs - singular: ipamconfig - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: IPAMConfigSpec contains the specification for an IPAMConfig - resource. - properties: - autoAllocateBlocks: - type: boolean - strictAffinity: - type: boolean - required: - - autoAllocateBlocks - - strictAffinity - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: (devel) - creationTimestamp: null - name: ipamhandles.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: IPAMHandle - listKind: IPAMHandleList - plural: ipamhandles - singular: ipamhandle - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: IPAMHandleSpec contains the specification for an IPAMHandle - resource. - properties: - block: - additionalProperties: - type: integer - type: object - handleID: - type: string - required: - - block - - handleID - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: (devel) - creationTimestamp: null - name: ippools.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: IPPool - listKind: IPPoolList - plural: ippools - singular: ippool - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: IPPoolSpec contains the specification for an IPPool resource. - properties: - blockSize: - description: The block size to use for IP address assignments from - this pool. Defaults to 26 for IPv4 and 112 for IPv6. - type: integer - cidr: - description: The pool CIDR. - type: string - disabled: - description: When disabled is true, Calico IPAM will not assign addresses - from this pool. - type: boolean - ipip: - description: 'Deprecated: this field is only used for APIv1 backwards - compatibility. Setting this field is not allowed, this field is - for internal use only.' - properties: - enabled: - description: When enabled is true, ipip tunneling will be used - to deliver packets to destinations within this pool. - type: boolean - mode: - description: The IPIP mode. This can be one of "always" or "cross-subnet". A - mode of "always" will also use IPIP tunneling for routing to - destination IP addresses within this pool. A mode of "cross-subnet" - will only use IPIP tunneling when the destination node is on - a different subnet to the originating node. The default value - (if not specified) is "always". - type: string - type: object - ipipMode: - description: Contains configuration for IPIP tunneling for this pool. - If not specified, then this is defaulted to "Never" (i.e. IPIP tunneling - is disabled). - type: string - nat-outgoing: - description: 'Deprecated: this field is only used for APIv1 backwards - compatibility. Setting this field is not allowed, this field is - for internal use only.' - type: boolean - natOutgoing: - description: When nat-outgoing is true, packets sent from Calico networked - containers in this pool to destinations outside of this pool will - be masqueraded. - type: boolean - nodeSelector: - description: Allows IPPool to allocate for a specific node by label - selector. - type: string - vxlanMode: - description: Contains configuration for VXLAN tunneling for this pool. - If not specified, then this is defaulted to "Never" (i.e. VXLAN - tunneling is disabled). - type: string - required: - - cidr - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: (devel) - creationTimestamp: null - name: kubecontrollersconfigurations.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: KubeControllersConfiguration - listKind: KubeControllersConfigurationList - plural: kubecontrollersconfigurations - singular: kubecontrollersconfiguration - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KubeControllersConfigurationSpec contains the values of the - Kubernetes controllers configuration. - properties: - controllers: - description: Controllers enables and configures individual Kubernetes - controllers - properties: - namespace: - description: Namespace enables and configures the namespace controller. - Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation - with the Calico datastore. [Default: 5m]' - type: string - type: object - node: - description: Node enables and configures the node controller. - Enabled by default, set to nil to disable. - properties: - hostEndpoint: - description: HostEndpoint controls syncing nodes to host endpoints. - Disabled by default, set to nil to disable. - properties: - autoCreate: - description: 'AutoCreate enables automatic creation of - host endpoints for every node. [Default: Disabled]' - type: string - type: object - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation - with the Calico datastore. [Default: 5m]' - type: string - syncLabels: - description: 'SyncLabels controls whether to copy Kubernetes - node labels to Calico nodes. [Default: Enabled]' - type: string - type: object - policy: - description: Policy enables and configures the policy controller. - Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation - with the Calico datastore. [Default: 5m]' - type: string - type: object - serviceAccount: - description: ServiceAccount enables and configures the service - account controller. Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation - with the Calico datastore. [Default: 5m]' - type: string - type: object - workloadEndpoint: - description: WorkloadEndpoint enables and configures the workload - endpoint controller. Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation - with the Calico datastore. [Default: 5m]' - type: string - type: object - type: object - etcdV3CompactionPeriod: - description: 'EtcdV3CompactionPeriod is the period between etcdv3 - compaction requests. Set to 0 to disable. [Default: 10m]' - type: string - healthChecks: - description: 'HealthChecks enables or disables support for health - checks [Default: Enabled]' - type: string - logSeverityScreen: - description: 'LogSeverityScreen is the log severity above which logs - are sent to the stdout. [Default: Info]' - type: string - required: - - controllers - type: object - status: - description: KubeControllersConfigurationStatus represents the status - of the configuration. It's useful for admins to be able to see the actual - config that was applied, which can be modified by environment variables - on the kube-controllers process. - properties: - environmentVars: - additionalProperties: - type: string - description: EnvironmentVars contains the environment variables on - the kube-controllers that influenced the RunningConfig. - type: object - runningConfig: - description: RunningConfig contains the effective config that is running - in the kube-controllers pod, after merging the API resource with - any environment variables. - properties: - controllers: - description: Controllers enables and configures individual Kubernetes - controllers - properties: - namespace: - description: Namespace enables and configures the namespace - controller. Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform - reconciliation with the Calico datastore. [Default: - 5m]' - type: string - type: object - node: - description: Node enables and configures the node controller. - Enabled by default, set to nil to disable. - properties: - hostEndpoint: - description: HostEndpoint controls syncing nodes to host - endpoints. Disabled by default, set to nil to disable. - properties: - autoCreate: - description: 'AutoCreate enables automatic creation - of host endpoints for every node. [Default: Disabled]' - type: string - type: object - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform - reconciliation with the Calico datastore. [Default: - 5m]' - type: string - syncLabels: - description: 'SyncLabels controls whether to copy Kubernetes - node labels to Calico nodes. [Default: Enabled]' - type: string - type: object - policy: - description: Policy enables and configures the policy controller. - Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform - reconciliation with the Calico datastore. [Default: - 5m]' - type: string - type: object - serviceAccount: - description: ServiceAccount enables and configures the service - account controller. Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform - reconciliation with the Calico datastore. [Default: - 5m]' - type: string - type: object - workloadEndpoint: - description: WorkloadEndpoint enables and configures the workload - endpoint controller. Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform - reconciliation with the Calico datastore. [Default: - 5m]' - type: string - type: object - type: object - etcdV3CompactionPeriod: - description: 'EtcdV3CompactionPeriod is the period between etcdv3 - compaction requests. Set to 0 to disable. [Default: 10m]' - type: string - healthChecks: - description: 'HealthChecks enables or disables support for health - checks [Default: Enabled]' - type: string - logSeverityScreen: - description: 'LogSeverityScreen is the log severity above which - logs are sent to the stdout. [Default: Info]' - type: string - required: - - controllers - type: object - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: (devel) - creationTimestamp: null - name: networkpolicies.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: NetworkPolicy - listKind: NetworkPolicyList - plural: networkpolicies - singular: networkpolicy - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - egress: - description: The ordered set of egress rules. Each rule contains - a set of packet match criteria and a corresponding action to apply. - items: - description: "A Rule encapsulates a set of match criteria and an - action. Both selector-based security Policy and security Profiles - reference rules - separated out as a list of rules for both ingress - and egress packet matching. \n Each positive match criteria has - a negated version, prefixed with ”Not”. All the match criteria - within a rule must be satisfied for a packet to match. A single - rule can contain the positive and negative version of a match - and both must be satisfied for the rule to match." - properties: - action: - type: string - destination: - description: Destination contains the match criteria that apply - to destination entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - http: - description: HTTP contains match criteria that apply to HTTP - requests. - properties: - methods: - description: Methods is an optional field that restricts - the rule to apply only to HTTP requests that use one of - the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple - methods are OR'd together. - items: - type: string - type: array - paths: - description: 'Paths is an optional field that restricts - the rule to apply to HTTP requests that use one of the - listed HTTP Paths. Multiple paths are OR''d together. - e.g: - exact: /foo - prefix: /bar NOTE: Each entry may - ONLY specify either a `exact` or a `prefix` match. The - validator will check for it.' - items: - description: 'HTTPPath specifies an HTTP path to match. - It may be either of the form: exact: : which matches - the path exactly or prefix: : which matches - the path prefix' - properties: - exact: - type: string - prefix: - type: string - type: object - type: array - type: object - icmp: - description: ICMP is an optional field that restricts the rule - to apply to a specific type and code of ICMP traffic. This - should only be specified if the Protocol field is set to "ICMP" - or "ICMPv6". - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - ipVersion: - description: IPVersion is an optional field that restricts the - rule to only match a specific IP version. - type: integer - metadata: - description: Metadata contains additional information for this - rule - properties: - annotations: - additionalProperties: - type: string - description: Annotations is a set of key value pairs that - give extra information about the rule - type: object - type: object - notICMP: - description: NotICMP is the negated version of the ICMP field. - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - notProtocol: - anyOf: - - type: integer - - type: string - description: NotProtocol is the negated version of the Protocol - field. - pattern: ^.* - x-kubernetes-int-or-string: true - protocol: - anyOf: - - type: integer - - type: string - description: "Protocol is an optional field that restricts the - rule to only apply to traffic of a specific IP protocol. Required - if any of the EntityRules contain Ports (because ports only - apply to certain protocols). \n Must be one of these string - values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\", - \"UDPLite\" or an integer in the range 1-255." - pattern: ^.* - x-kubernetes-int-or-string: true - source: - description: Source contains the match criteria that apply to - source entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - required: - - action - type: object - type: array - ingress: - description: The ordered set of ingress rules. Each rule contains - a set of packet match criteria and a corresponding action to apply. - items: - description: "A Rule encapsulates a set of match criteria and an - action. Both selector-based security Policy and security Profiles - reference rules - separated out as a list of rules for both ingress - and egress packet matching. \n Each positive match criteria has - a negated version, prefixed with ”Not”. All the match criteria - within a rule must be satisfied for a packet to match. A single - rule can contain the positive and negative version of a match - and both must be satisfied for the rule to match." - properties: - action: - type: string - destination: - description: Destination contains the match criteria that apply - to destination entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - http: - description: HTTP contains match criteria that apply to HTTP - requests. - properties: - methods: - description: Methods is an optional field that restricts - the rule to apply only to HTTP requests that use one of - the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple - methods are OR'd together. - items: - type: string - type: array - paths: - description: 'Paths is an optional field that restricts - the rule to apply to HTTP requests that use one of the - listed HTTP Paths. Multiple paths are OR''d together. - e.g: - exact: /foo - prefix: /bar NOTE: Each entry may - ONLY specify either a `exact` or a `prefix` match. The - validator will check for it.' - items: - description: 'HTTPPath specifies an HTTP path to match. - It may be either of the form: exact: : which matches - the path exactly or prefix: : which matches - the path prefix' - properties: - exact: - type: string - prefix: - type: string - type: object - type: array - type: object - icmp: - description: ICMP is an optional field that restricts the rule - to apply to a specific type and code of ICMP traffic. This - should only be specified if the Protocol field is set to "ICMP" - or "ICMPv6". - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - ipVersion: - description: IPVersion is an optional field that restricts the - rule to only match a specific IP version. - type: integer - metadata: - description: Metadata contains additional information for this - rule - properties: - annotations: - additionalProperties: - type: string - description: Annotations is a set of key value pairs that - give extra information about the rule - type: object - type: object - notICMP: - description: NotICMP is the negated version of the ICMP field. - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - notProtocol: - anyOf: - - type: integer - - type: string - description: NotProtocol is the negated version of the Protocol - field. - pattern: ^.* - x-kubernetes-int-or-string: true - protocol: - anyOf: - - type: integer - - type: string - description: "Protocol is an optional field that restricts the - rule to only apply to traffic of a specific IP protocol. Required - if any of the EntityRules contain Ports (because ports only - apply to certain protocols). \n Must be one of these string - values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\", - \"UDPLite\" or an integer in the range 1-255." - pattern: ^.* - x-kubernetes-int-or-string: true - source: - description: Source contains the match criteria that apply to - source entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - required: - - action - type: object - type: array - order: - description: Order is an optional field that specifies the order in - which the policy is applied. Policies with higher "order" are applied - after those with lower order. If the order is omitted, it may be - considered to be "infinite" - i.e. the policy will be applied last. Policies - with identical order will be applied in alphanumerical order based - on the Policy "Name". - type: number - selector: - description: "The selector is an expression used to pick pick out - the endpoints that the policy should be applied to. \n Selector - expressions follow this syntax: \n \tlabel == \"string_literal\" - \ -> comparison, e.g. my_label == \"foo bar\" \tlabel != \"string_literal\" - \ -> not equal; also matches if label is not present \tlabel in - { \"a\", \"b\", \"c\", ... } -> true if the value of label X is - one of \"a\", \"b\", \"c\" \tlabel not in { \"a\", \"b\", \"c\", - ... } -> true if the value of label X is not one of \"a\", \"b\", - \"c\" \thas(label_name) -> True if that label is present \t! expr - -> negation of expr \texpr && expr -> Short-circuit and \texpr - || expr -> Short-circuit or \t( expr ) -> parens for grouping \tall() - or the empty selector -> matches all endpoints. \n Label names are - allowed to contain alphanumerics, -, _ and /. String literals are - more permissive but they do not support escape characters. \n Examples - (with made-up labels): \n \ttype == \"webserver\" && deployment - == \"prod\" \ttype in {\"frontend\", \"backend\"} \tdeployment != - \"dev\" \t! has(label_name)" - type: string - serviceAccountSelector: - description: ServiceAccountSelector is an optional field for an expression - used to select a pod based on service accounts. - type: string - types: - description: "Types indicates whether this policy applies to ingress, - or to egress, or to both. When not explicitly specified (and so - the value on creation is empty or nil), Calico defaults Types according - to what Ingress and Egress are present in the policy. The default - is: \n - [ PolicyTypeIngress ], if there are no Egress rules (including - the case where there are also no Ingress rules) \n - [ PolicyTypeEgress - ], if there are Egress rules but no Ingress rules \n - [ PolicyTypeIngress, - PolicyTypeEgress ], if there are both Ingress and Egress rules. - \n When the policy is read back again, Types will always be one - of these values, never empty or nil." - items: - description: PolicyType enumerates the possible values of the PolicySpec - Types field. - type: string - type: array - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: (devel) - creationTimestamp: null - name: networksets.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: NetworkSet - listKind: NetworkSetList - plural: networksets - singular: networkset - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - description: NetworkSet is the Namespaced-equivalent of the GlobalNetworkSet. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: NetworkSetSpec contains the specification for a NetworkSet - resource. - properties: - nets: - description: The list of IP networks that belong to this set. - items: - type: string - type: array - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- ---- -# Source: calico/templates/calico-kube-controllers-rbac.yaml - -# Include a clusterrole for the kube-controllers component, -# and bind it to the calico-kube-controllers serviceaccount. -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: calico-kube-controllers -rules: - # Nodes are watched to monitor for deletions. - - apiGroups: [""] - resources: - - nodes - verbs: - - watch - - list - - get - # Pods are queried to check for existence. - - apiGroups: [""] - resources: - - pods - verbs: - - get - # IPAM resources are manipulated when nodes are deleted. - - apiGroups: ["crd.projectcalico.org"] - resources: - - ippools - verbs: - - list - - apiGroups: ["crd.projectcalico.org"] - resources: - - blockaffinities - - ipamblocks - - ipamhandles - verbs: - - get - - list - - create - - update - - delete - # kube-controllers manages hostendpoints. - - apiGroups: ["crd.projectcalico.org"] - resources: - - hostendpoints - verbs: - - get - - list - - create - - update - - delete - # Needs access to update clusterinformations. - - apiGroups: ["crd.projectcalico.org"] - resources: - - clusterinformations - verbs: - - get - - create - - update - # KubeControllersConfiguration is where it gets its config - - apiGroups: ["crd.projectcalico.org"] - resources: - - kubecontrollersconfigurations - verbs: - # read its own config - - get - # create a default if none exists - - create - # update status - - update - # watch for changes - - watch ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: calico-kube-controllers -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: calico-kube-controllers -subjects: -- kind: ServiceAccount - name: calico-kube-controllers - namespace: kube-system ---- - ---- -# Source: calico/templates/calico-node-rbac.yaml -# Include a clusterrole for the calico-node DaemonSet, -# and bind it to the calico-node serviceaccount. -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: calico-node -rules: - # The CNI plugin needs to get pods, nodes, and namespaces. - - apiGroups: [""] - resources: - - pods - - nodes - - namespaces - verbs: - - get - - apiGroups: [""] - resources: - - endpoints - - services - verbs: - # Used to discover service IPs for advertisement. - - watch - - list - # Used to discover Typhas. - - get - # Pod CIDR auto-detection on kubeadm needs access to config maps. - - apiGroups: [""] - resources: - - configmaps - verbs: - - get - - apiGroups: [""] - resources: - - nodes/status - verbs: - # Needed for clearing NodeNetworkUnavailable flag. - - patch - # Calico stores some configuration information in node annotations. - - update - # Watch for changes to Kubernetes NetworkPolicies. - - apiGroups: ["networking.k8s.io"] - resources: - - networkpolicies - verbs: - - watch - - list - # Used by Calico for policy information. - - apiGroups: [""] - resources: - - pods - - namespaces - - serviceaccounts - verbs: - - list - - watch - # The CNI plugin patches pods/status. - - apiGroups: [""] - resources: - - pods/status - verbs: - - patch - # Calico monitors various CRDs for config. - - apiGroups: ["crd.projectcalico.org"] - resources: - - globalfelixconfigs - - felixconfigurations - - bgppeers - - globalbgpconfigs - - bgpconfigurations - - ippools - - ipamblocks - - globalnetworkpolicies - - globalnetworksets - - networkpolicies - - networksets - - clusterinformations - - hostendpoints - - blockaffinities - verbs: - - get - - list - - watch - # Calico must create and update some CRDs on startup. - - apiGroups: ["crd.projectcalico.org"] - resources: - - ippools - - felixconfigurations - - clusterinformations - verbs: - - create - - update - # Calico stores some configuration information on the node. - - apiGroups: [""] - resources: - - nodes - verbs: - - get - - list - - watch - # These permissions are only required for upgrade from v2.6, and can - # be removed after upgrade or on fresh installations. - - apiGroups: ["crd.projectcalico.org"] - resources: - - bgpconfigurations - - bgppeers - verbs: - - create - - update - # These permissions are required for Calico CNI to perform IPAM allocations. - - apiGroups: ["crd.projectcalico.org"] - resources: - - blockaffinities - - ipamblocks - - ipamhandles - verbs: - - get - - list - - create - - update - - delete - - apiGroups: ["crd.projectcalico.org"] - resources: - - ipamconfigs - verbs: - - get - # Block affinities must also be watchable by confd for route aggregation. - - apiGroups: ["crd.projectcalico.org"] - resources: - - blockaffinities - verbs: - - watch - # The Calico IPAM migration needs to get daemonsets. These permissions can be - # removed if not upgrading from an installation using host-local IPAM. - - apiGroups: ["apps"] - resources: - - daemonsets - verbs: - - get - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: calico-node -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: calico-node -subjects: -- kind: ServiceAccount - name: calico-node - namespace: kube-system - ---- -# Source: calico/templates/calico-node.yaml -# This manifest installs the calico-node container, as well -# as the CNI plugins and network config on -# each master and worker node in a Kubernetes cluster. -kind: DaemonSet -apiVersion: apps/v1 -metadata: - name: calico-node - namespace: kube-system - labels: - k8s-app: calico-node -spec: - selector: - matchLabels: - k8s-app: calico-node - updateStrategy: - type: RollingUpdate - rollingUpdate: - maxUnavailable: 1 - template: - metadata: - labels: - k8s-app: calico-node - spec: - nodeSelector: - kubernetes.io/os: linux - hostNetwork: true - tolerations: - # Make sure calico-node gets scheduled on all nodes. - - effect: NoSchedule - operator: Exists - # Mark the pod as a critical add-on for rescheduling. - - key: CriticalAddonsOnly - operator: Exists - - effect: NoExecute - operator: Exists - - key: node-role.kubernetes.io/master - effect: NoSchedule - serviceAccountName: calico-node - # Minimize downtime during a rolling upgrade or deletion; tell Kubernetes to do a "force - # deletion": https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods. - terminationGracePeriodSeconds: 0 - priorityClassName: system-node-critical - initContainers: - # This container performs upgrade from host-local IPAM to calico-ipam. - # It can be deleted if this is a fresh installation, or if you have already - # upgraded to use calico-ipam. - - name: upgrade-ipam - image: calico/cni:v3.15.0 - command: ["/opt/cni/bin/calico-ipam", "-upgrade"] - env: - - name: KUBERNETES_NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: CALICO_NETWORKING_BACKEND - valueFrom: - configMapKeyRef: - name: calico-config - key: calico_backend - volumeMounts: - - mountPath: /var/lib/cni/networks - name: host-local-net-dir - - mountPath: /host/opt/cni/bin - name: cni-bin-dir - securityContext: - privileged: true - # This container installs the CNI binaries - # and CNI network config file on each node. - - name: install-cni - image: calico/cni:v3.15.0 - command: ["/install-cni.sh"] - env: - # Name of the CNI config file to create. - - name: CNI_CONF_NAME - value: "10-calico.conflist" - # The CNI network config to install on each node. - - name: CNI_NETWORK_CONFIG - valueFrom: - configMapKeyRef: - name: calico-config - key: cni_network_config - # Set the hostname based on the k8s node name. - - name: KUBERNETES_NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - # CNI MTU Config variable - - name: CNI_MTU - valueFrom: - configMapKeyRef: - name: calico-config - key: veth_mtu - # Prevents the container from sleeping forever. - - name: SLEEP - value: "false" - volumeMounts: - - mountPath: /host/opt/cni/bin - name: cni-bin-dir - - mountPath: /host/etc/cni/net.d - name: cni-net-dir - securityContext: - privileged: true - # Adds a Flex Volume Driver that creates a per-pod Unix Domain Socket to allow Dikastes - # to communicate with Felix over the Policy Sync API. - - name: flexvol-driver - image: calico/pod2daemon-flexvol:v3.15.0 - volumeMounts: - - name: flexvol-driver-host - mountPath: /host/driver - securityContext: - privileged: true - containers: - # Runs calico-node container on each Kubernetes node. This - # container programs network policy and routes on each - # host. - - name: calico-node - image: calico/node:v3.15.0 - env: - # Use Kubernetes API as the backing datastore. - - name: DATASTORE_TYPE - value: "kubernetes" - # Wait for the datastore. - - name: WAIT_FOR_DATASTORE - value: "true" - # Set based on the k8s node name. - - name: NODENAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - # Choose the backend to use. - - name: CALICO_NETWORKING_BACKEND - valueFrom: - configMapKeyRef: - name: calico-config - key: calico_backend - # Cluster type to identify the deployment type - - name: CLUSTER_TYPE - value: "k8s,bgp" - # Auto-detect the BGP IP address. - - name: IP - value: "autodetect" - # Enable IPIP - - name: CALICO_IPV4POOL_IPIP - value: "Always" - # Enable or Disable VXLAN on the default IP pool. - - name: CALICO_IPV4POOL_VXLAN - value: "Never" - # Set MTU for tunnel device used if ipip is enabled - - name: FELIX_IPINIPMTU - valueFrom: - configMapKeyRef: - name: calico-config - key: veth_mtu - # Set MTU for the VXLAN tunnel device. - - name: FELIX_VXLANMTU - valueFrom: - configMapKeyRef: - name: calico-config - key: veth_mtu - # Set MTU for the Wireguard tunnel device. - - name: FELIX_WIREGUARDMTU - valueFrom: - configMapKeyRef: - name: calico-config - key: veth_mtu - # The default IPv4 pool to create on startup if none exists. Pod IPs will be - # chosen from this range. Changing this value after installation will have - # no effect. This should fall within `--cluster-cidr`. - # - name: CALICO_IPV4POOL_CIDR - # value: "192.168.0.0/16" - # Set MTU for the Wireguard tunnel device. - - name: FELIX_WIREGUARDMTU - valueFrom: - configMapKeyRef: - name: calico-config - key: veth_mtu - # Disable file logging so `kubectl logs` works. - - name: CALICO_DISABLE_FILE_LOGGING - value: "true" - # Set Felix endpoint to host default action to ACCEPT. - - name: FELIX_DEFAULTENDPOINTTOHOSTACTION - value: "ACCEPT" - # Disable IPv6 on Kubernetes. - - name: FELIX_IPV6SUPPORT - value: "false" - # Set Felix logging to "info" - - name: FELIX_LOGSEVERITYSCREEN - value: "info" - - name: FELIX_HEALTHENABLED - value: "true" - securityContext: - privileged: true - resources: - requests: - cpu: 250m - livenessProbe: - exec: - command: - - /bin/calico-node - - -felix-live - - -bird-live - periodSeconds: 10 - initialDelaySeconds: 10 - failureThreshold: 6 - readinessProbe: - exec: - command: - - /bin/calico-node - - -felix-ready - - -bird-ready - periodSeconds: 10 - volumeMounts: - - mountPath: /lib/modules - name: lib-modules - readOnly: true - - mountPath: /run/xtables.lock - name: xtables-lock - readOnly: false - - mountPath: /var/run/calico - name: var-run-calico - readOnly: false - - mountPath: /var/lib/calico - name: var-lib-calico - readOnly: false - - name: policysync - mountPath: /var/run/nodeagent - volumes: - # Used by calico-node. - - name: lib-modules - hostPath: - path: /lib/modules - - name: var-run-calico - hostPath: - path: /var/run/calico - - name: var-lib-calico - hostPath: - path: /var/lib/calico - - name: xtables-lock - hostPath: - path: /run/xtables.lock - type: FileOrCreate - # Used to install CNI. - - name: cni-bin-dir - hostPath: - path: /opt/cni/bin - - name: cni-net-dir - hostPath: - path: /etc/cni/net.d - # Mount in the directory for host-local IPAM allocations. This is - # used when upgrading from host-local to calico-ipam, and can be removed - # if not using the upgrade-ipam init container. - - name: host-local-net-dir - hostPath: - path: /var/lib/cni/networks - # Used to create per-pod Unix Domain Sockets - - name: policysync - hostPath: - type: DirectoryOrCreate - path: /var/run/nodeagent - # Used to install Flex Volume Driver - - name: flexvol-driver-host - hostPath: - type: DirectoryOrCreate - path: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/nodeagent~uds ---- - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: calico-node - namespace: kube-system - ---- -# Source: calico/templates/calico-kube-controllers.yaml -# See https://github.com/projectcalico/kube-controllers -apiVersion: apps/v1 -kind: Deployment -metadata: - name: calico-kube-controllers - namespace: kube-system - labels: - k8s-app: calico-kube-controllers -spec: - # The controllers can only have a single active instance. - replicas: 1 - selector: - matchLabels: - k8s-app: calico-kube-controllers - strategy: - type: Recreate - template: - metadata: - name: calico-kube-controllers - namespace: kube-system - labels: - k8s-app: calico-kube-controllers - spec: - nodeSelector: - kubernetes.io/os: linux - tolerations: - # Mark the pod as a critical add-on for rescheduling. - - key: CriticalAddonsOnly - operator: Exists - - key: node-role.kubernetes.io/master - effect: NoSchedule - serviceAccountName: calico-kube-controllers - priorityClassName: system-cluster-critical - containers: - - name: calico-kube-controllers - image: calico/kube-controllers:v3.15.0 - env: - # Choose which controllers to run. - - name: ENABLED_CONTROLLERS - value: node - - name: DATASTORE_TYPE - value: kubernetes - readinessProbe: - exec: - command: - - /usr/bin/check-status - - -r - ---- - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: calico-kube-controllers - namespace: kube-system - ---- -# Source: calico/templates/calico-etcd-secrets.yaml - ---- -# Source: calico/templates/calico-typha.yaml - ---- -# Source: calico/templates/configure-canal.yaml - - diff --git a/usage/guides/calico/index.html b/usage/guides/calico/index.html deleted file mode 100644 index 9f6cd74d..00000000 --- a/usage/guides/calico/index.html +++ /dev/null @@ -1,1129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Use Calico instead of Flannel - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
- -
-
- - -
-
- - - - - - - -

Use Calico instead of Flannel

-

If you want to use NetworkPolicy you can use Calico in k3s instead of Flannel.

-

1. Download and modify the Calico descriptor

-

You can following the documentation

-

And then you have to change the ConfigMap calico-config. On the cni_network_config add the entry for allowing IP forwarding

-
"container_settings": {
-    "allow_ip_forwarding": true
-}
-
-

Or you can directly use this calico.yaml manifest

-

2. Create the cluster without flannel and with calico

-

On the k3s cluster creation :

-
    -
  • add the flag --flannel-backend=none. For this, on k3d you need to forward this flag to k3s with the option --k3s-server-arg.
  • -
  • mount (--volume) the calico descriptor in the auto deploy manifest directory of k3s /var/lib/rancher/k3s/server/manifests/
  • -
-

So the command of the cluster creation is (when you are at root of the k3d repository)

-
k3d cluster create "${clustername}" \
-  --k3s-server-arg '--flannel-backend=none' \
-  --volume "$(pwd)/docs/usage/guides/calico.yaml:/var/lib/rancher/k3s/server/manifests/calico.yaml"
-
-

In this example :

-
    -
  • change "${clustername}" with the name of the cluster (or set a variable).
  • -
  • $(pwd)/docs/usage/guides/calico.yaml is the absolute path of the calico manifest, you can adapt it.
  • -
-

You can add other options, see.

-

The cluster will start without flannel and with Calico as CNI Plugin.

-

For watching for the pod(s) deployment

-
watch "kubectl get pods -n kube-system"    
-
-

You will have something like this at beginning (with the command line kubectl get pods -n kube-system)

-
NAME                                       READY   STATUS     RESTARTS   AGE
-helm-install-traefik-pn84f                 0/1     Pending    0          3s
-calico-node-97rx8                          0/1     Init:0/3   0          3s
-metrics-server-7566d596c8-hwnqq            0/1     Pending    0          2s
-calico-kube-controllers-58b656d69f-2z7cn   0/1     Pending    0          2s
-local-path-provisioner-6d59f47c7-rmswg     0/1     Pending    0          2s
-coredns-8655855d6-cxtnr                    0/1     Pending    0          2s
-
-

And when it finish to start

-
NAME                                       READY   STATUS      RESTARTS   AGE
-metrics-server-7566d596c8-hwnqq            1/1     Running     0          56s
-calico-node-97rx8                          1/1     Running     0          57s
-helm-install-traefik-pn84f                 0/1     Completed   1          57s
-svclb-traefik-lmjr5                        2/2     Running     0          28s
-calico-kube-controllers-58b656d69f-2z7cn   1/1     Running     0          56s
-local-path-provisioner-6d59f47c7-rmswg     1/1     Running     0          56s
-traefik-758cd5fc85-x8p57                   1/1     Running     0          28s
-coredns-8655855d6-cxtnr                    1/1     Running     0          56s
-
-

Note :

-
    -
  • you can use the auto deploy manifest or a kubectl apply depending on your needs
  • -
  • ❗ Calico is not as quick as Flannel (but it provides more features)
  • -
-

References

- - - - - -
-
- - - Last update: June 9, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/guides/cuda/Dockerfile b/usage/guides/cuda/Dockerfile deleted file mode 100644 index d17e8da0..00000000 --- a/usage/guides/cuda/Dockerfile +++ /dev/null @@ -1,47 +0,0 @@ -ARG K3S_TAG="v1.21.2-k3s1" -FROM rancher/k3s:$K3S_TAG as k3s - -FROM nvidia/cuda:11.2.0-base-ubuntu18.04 - -ARG NVIDIA_CONTAINER_RUNTIME_VERSION -ENV NVIDIA_CONTAINER_RUNTIME_VERSION=$NVIDIA_CONTAINER_RUNTIME_VERSION - -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections - -RUN apt-get update && \ - apt-get -y install gnupg2 curl - -# Install NVIDIA Container Runtime -RUN curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | apt-key add - - -RUN curl -s -L https://nvidia.github.io/nvidia-container-runtime/ubuntu18.04/nvidia-container-runtime.list | tee /etc/apt/sources.list.d/nvidia-container-runtime.list - -RUN apt-get update && \ - apt-get -y install nvidia-container-runtime=${NVIDIA_CONTAINER_RUNTIME_VERSION} - -COPY --from=k3s / / - -RUN mkdir -p /etc && \ - echo 'hosts: files dns' > /etc/nsswitch.conf - -RUN chmod 1777 /tmp - -# Provide custom containerd configuration to configure the nvidia-container-runtime -RUN mkdir -p /var/lib/rancher/k3s/agent/etc/containerd/ - -COPY config.toml.tmpl /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl - -# Deploy the nvidia driver plugin on startup -RUN mkdir -p /var/lib/rancher/k3s/server/manifests - -COPY device-plugin-daemonset.yaml /var/lib/rancher/k3s/server/manifests/nvidia-device-plugin-daemonset.yaml - -VOLUME /var/lib/kubelet -VOLUME /var/lib/rancher/k3s -VOLUME /var/lib/cni -VOLUME /var/log - -ENV PATH="$PATH:/bin/aux" - -ENTRYPOINT ["/bin/k3s"] -CMD ["agent"] \ No newline at end of file diff --git a/usage/guides/cuda/build.sh b/usage/guides/cuda/build.sh deleted file mode 100644 index 562601dc..00000000 --- a/usage/guides/cuda/build.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -set -euxo pipefail - -K3S_TAG=${K3S_TAG:="v1.21.2-k3s1"} # replace + with -, if needed -IMAGE_REGISTRY=${IMAGE_REGISTRY:="MY_REGISTRY"} -IMAGE_REPOSITORY=${IMAGE_REPOSITORY:="rancher/k3s"} -IMAGE_TAG="$K3S_TAG-cuda" -IMAGE=${IMAGE:="$IMAGE_REGISTRY/$IMAGE_REPOSITORY:$IMAGE_TAG"} - -NVIDIA_CONTAINER_RUNTIME_VERSION=${NVIDIA_CONTAINER_RUNTIME_VERSION:="3.5.0-1"} - -echo "IMAGE=$IMAGE" - -# due to some unknown reason, copying symlinks fails with buildkit enabled -DOCKER_BUILDKIT=0 docker build \ - --build-arg K3S_TAG=$K3S_TAG \ - --build-arg NVIDIA_CONTAINER_RUNTIME_VERSION=$NVIDIA_CONTAINER_RUNTIME_VERSION \ - -t $IMAGE . -docker push $IMAGE -echo "Done!" \ No newline at end of file diff --git a/usage/guides/cuda/config.toml.tmpl b/usage/guides/cuda/config.toml.tmpl deleted file mode 100644 index 4d5c7fa4..00000000 --- a/usage/guides/cuda/config.toml.tmpl +++ /dev/null @@ -1,55 +0,0 @@ -[plugins.opt] - path = "{{ .NodeConfig.Containerd.Opt }}" - -[plugins.cri] - stream_server_address = "127.0.0.1" - stream_server_port = "10010" - -{{- if .IsRunningInUserNS }} - disable_cgroup = true - disable_apparmor = true - restrict_oom_score_adj = true -{{end}} - -{{- if .NodeConfig.AgentConfig.PauseImage }} - sandbox_image = "{{ .NodeConfig.AgentConfig.PauseImage }}" -{{end}} - -{{- if not .NodeConfig.NoFlannel }} -[plugins.cri.cni] - bin_dir = "{{ .NodeConfig.AgentConfig.CNIBinDir }}" - conf_dir = "{{ .NodeConfig.AgentConfig.CNIConfDir }}" -{{end}} - -[plugins.cri.containerd.runtimes.runc] - # ---- changed from 'io.containerd.runc.v2' for GPU support - runtime_type = "io.containerd.runtime.v1.linux" - -# ---- added for GPU support -[plugins.linux] - runtime = "nvidia-container-runtime" - -{{ if .PrivateRegistryConfig }} -{{ if .PrivateRegistryConfig.Mirrors }} -[plugins.cri.registry.mirrors]{{end}} -{{range $k, $v := .PrivateRegistryConfig.Mirrors }} -[plugins.cri.registry.mirrors."{{$k}}"] - endpoint = [{{range $i, $j := $v.Endpoints}}{{if $i}}, {{end}}{{printf "%q" .}}{{end}}] -{{end}} - -{{range $k, $v := .PrivateRegistryConfig.Configs }} -{{ if $v.Auth }} -[plugins.cri.registry.configs."{{$k}}".auth] - {{ if $v.Auth.Username }}username = "{{ $v.Auth.Username }}"{{end}} - {{ if $v.Auth.Password }}password = "{{ $v.Auth.Password }}"{{end}} - {{ if $v.Auth.Auth }}auth = "{{ $v.Auth.Auth }}"{{end}} - {{ if $v.Auth.IdentityToken }}identitytoken = "{{ $v.Auth.IdentityToken }}"{{end}} -{{end}} -{{ if $v.TLS }} -[plugins.cri.registry.configs."{{$k}}".tls] - {{ if $v.TLS.CAFile }}ca_file = "{{ $v.TLS.CAFile }}"{{end}} - {{ if $v.TLS.CertFile }}cert_file = "{{ $v.TLS.CertFile }}"{{end}} - {{ if $v.TLS.KeyFile }}key_file = "{{ $v.TLS.KeyFile }}"{{end}} -{{end}} -{{end}} -{{end}} \ No newline at end of file diff --git a/usage/guides/cuda/cuda-vector-add.yaml b/usage/guides/cuda/cuda-vector-add.yaml deleted file mode 100644 index e22849b4..00000000 --- a/usage/guides/cuda/cuda-vector-add.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: cuda-vector-add -spec: - restartPolicy: OnFailure - containers: - - name: cuda-vector-add - image: "k8s.gcr.io/cuda-vector-add:v0.1" - resources: - limits: - nvidia.com/gpu: 1 \ No newline at end of file diff --git a/usage/guides/cuda/device-plugin-daemonset.yaml b/usage/guides/cuda/device-plugin-daemonset.yaml deleted file mode 100644 index 6bb521a3..00000000 --- a/usage/guides/cuda/device-plugin-daemonset.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: nvidia-device-plugin-daemonset - namespace: kube-system -spec: - selector: - matchLabels: - name: nvidia-device-plugin-ds - template: - metadata: - # Mark this pod as a critical add-on; when enabled, the critical add-on scheduler - # reserves resources for critical add-on pods so that they can be rescheduled after - # a failure. This annotation works in tandem with the toleration below. - annotations: - scheduler.alpha.kubernetes.io/critical-pod: "" - labels: - name: nvidia-device-plugin-ds - spec: - tolerations: - # Allow this pod to be rescheduled while the node is in "critical add-ons only" mode. - # This, along with the annotation above marks this pod as a critical add-on. - - key: CriticalAddonsOnly - operator: Exists - containers: - - env: - - name: DP_DISABLE_HEALTHCHECKS - value: xids - image: nvidia/k8s-device-plugin:1.11 - name: nvidia-device-plugin-ctr - securityContext: - allowPrivilegeEscalation: true - capabilities: - drop: ["ALL"] - volumeMounts: - - name: device-plugin - mountPath: /var/lib/kubelet/device-plugins - volumes: - - name: device-plugin - hostPath: - path: /var/lib/kubelet/device-plugins \ No newline at end of file diff --git a/usage/guides/cuda/index.html b/usage/guides/cuda/index.html deleted file mode 100644 index ebab5910..00000000 --- a/usage/guides/cuda/index.html +++ /dev/null @@ -1,1408 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Running CUDA workloads - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
- -
- - -
-
- - - - - - - -

Running CUDA workloads

-

If you want to run CUDA workloads on the K3s container you need to customize the container.
-CUDA workloads require the NVIDIA Container Runtime, so containerd needs to be configured to use this runtime.
-The K3s container itself also needs to run with this runtime.
-If you are using Docker you can install the NVIDIA Container Toolkit.

-

Building a customized K3s image

-

To get the NVIDIA container runtime in the K3s image you need to build your own K3s image.
-The native K3s image is based on Alpine but the NVIDIA container runtime is not supported on Alpine yet.
-To get around this we need to build the image with a supported base image.

-

Dockerfile

-

Dockerfile:

-
ARG K3S_TAG="v1.21.2-k3s1"
-FROM rancher/k3s:$K3S_TAG as k3s
-
-FROM nvidia/cuda:11.2.0-base-ubuntu18.04
-
-ARG NVIDIA_CONTAINER_RUNTIME_VERSION
-ENV NVIDIA_CONTAINER_RUNTIME_VERSION=$NVIDIA_CONTAINER_RUNTIME_VERSION
-
-RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
-
-RUN apt-get update && \
-    apt-get -y install gnupg2 curl
-
-# Install NVIDIA Container Runtime
-RUN curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | apt-key add -
-
-RUN curl -s -L https://nvidia.github.io/nvidia-container-runtime/ubuntu18.04/nvidia-container-runtime.list | tee /etc/apt/sources.list.d/nvidia-container-runtime.list
-
-RUN apt-get update && \
-    apt-get -y install nvidia-container-runtime=${NVIDIA_CONTAINER_RUNTIME_VERSION}
-
-COPY --from=k3s / /
-
-RUN mkdir -p /etc && \
-    echo 'hosts: files dns' > /etc/nsswitch.conf
-
-RUN chmod 1777 /tmp
-
-# Provide custom containerd configuration to configure the nvidia-container-runtime
-RUN mkdir -p /var/lib/rancher/k3s/agent/etc/containerd/
-
-COPY config.toml.tmpl /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl
-
-# Deploy the nvidia driver plugin on startup
-RUN mkdir -p /var/lib/rancher/k3s/server/manifests
-
-COPY device-plugin-daemonset.yaml /var/lib/rancher/k3s/server/manifests/nvidia-device-plugin-daemonset.yaml
-
-VOLUME /var/lib/kubelet
-VOLUME /var/lib/rancher/k3s
-VOLUME /var/lib/cni
-VOLUME /var/log
-
-ENV PATH="$PATH:/bin/aux"
-
-ENTRYPOINT ["/bin/k3s"]
-CMD ["agent"]
-
-

This Dockerfile is based on the K3s Dockerfile -The following changes are applied:

-
    -
  1. Change the base images to nvidia/cuda:11.2.0-base-ubuntu18.04 so the NVIDIA Container Runtime can be installed. The version of cuda:xx.x.x must match the one you’re planning to use.
  2. -
  3. Add a custom containerd config.toml template to add the NVIDIA Container Runtime. This replaces the default runc runtime
  4. -
  5. Add a manifest for the NVIDIA driver plugin for Kubernetes
  6. -
-

Configure containerd

-

We need to configure containerd to use the NVIDIA Container Runtime. We need to customize the config.toml that is used at startup. K3s provides a way to do this using a config.toml.tmpl file. More information can be found on the K3s site.

-
[plugins.opt]
-  path = "{{ .NodeConfig.Containerd.Opt }}"
-
-[plugins.cri]
-  stream_server_address = "127.0.0.1"
-  stream_server_port = "10010"
-
-{{- if .IsRunningInUserNS }}
-  disable_cgroup = true
-  disable_apparmor = true
-  restrict_oom_score_adj = true
-{{end}}
-
-{{- if .NodeConfig.AgentConfig.PauseImage }}
-  sandbox_image = "{{ .NodeConfig.AgentConfig.PauseImage }}"
-{{end}}
-
-{{- if not .NodeConfig.NoFlannel }}
-[plugins.cri.cni]
-  bin_dir = "{{ .NodeConfig.AgentConfig.CNIBinDir }}"
-  conf_dir = "{{ .NodeConfig.AgentConfig.CNIConfDir }}"
-{{end}}
-
-[plugins.cri.containerd.runtimes.runc]
-  # ---- changed from 'io.containerd.runc.v2' for GPU support
-  runtime_type = "io.containerd.runtime.v1.linux"
-
-# ---- added for GPU support
-[plugins.linux]
-  runtime = "nvidia-container-runtime"
-
-{{ if .PrivateRegistryConfig }}
-{{ if .PrivateRegistryConfig.Mirrors }}
-[plugins.cri.registry.mirrors]{{end}}
-{{range $k, $v := .PrivateRegistryConfig.Mirrors }}
-[plugins.cri.registry.mirrors."{{$k}}"]
-  endpoint = [{{range $i, $j := $v.Endpoints}}{{if $i}}, {{end}}{{printf "%q" .}}{{end}}]
-{{end}}
-
-{{range $k, $v := .PrivateRegistryConfig.Configs }}
-{{ if $v.Auth }}
-[plugins.cri.registry.configs."{{$k}}".auth]
-  {{ if $v.Auth.Username }}username = "{{ $v.Auth.Username }}"{{end}}
-  {{ if $v.Auth.Password }}password = "{{ $v.Auth.Password }}"{{end}}
-  {{ if $v.Auth.Auth }}auth = "{{ $v.Auth.Auth }}"{{end}}
-  {{ if $v.Auth.IdentityToken }}identitytoken = "{{ $v.Auth.IdentityToken }}"{{end}}
-{{end}}
-{{ if $v.TLS }}
-[plugins.cri.registry.configs."{{$k}}".tls]
-  {{ if $v.TLS.CAFile }}ca_file = "{{ $v.TLS.CAFile }}"{{end}}
-  {{ if $v.TLS.CertFile }}cert_file = "{{ $v.TLS.CertFile }}"{{end}}
-  {{ if $v.TLS.KeyFile }}key_file = "{{ $v.TLS.KeyFile }}"{{end}}
-{{end}}
-{{end}}
-{{end}}
-
-

The NVIDIA device plugin

-

To enable NVIDIA GPU support on Kubernetes you also need to install the NVIDIA device plugin. The device plugin is a deamonset and allows you to automatically:

-
    -
  • Expose the number of GPUs on each nodes of your cluster
  • -
  • Keep track of the health of your GPUs
  • -
  • Run GPU enabled containers in your Kubernetes cluster.
  • -
-
apiVersion: apps/v1
-kind: DaemonSet
-metadata:
-  name: nvidia-device-plugin-daemonset
-  namespace: kube-system
-spec:
-  selector:
-    matchLabels:
-      name: nvidia-device-plugin-ds
-  template:
-    metadata:
-      # Mark this pod as a critical add-on; when enabled, the critical add-on scheduler
-      # reserves resources for critical add-on pods so that they can be rescheduled after
-      # a failure.  This annotation works in tandem with the toleration below.
-      annotations:
-        scheduler.alpha.kubernetes.io/critical-pod: ""
-      labels:
-        name: nvidia-device-plugin-ds
-    spec:
-      tolerations:
-      # Allow this pod to be rescheduled while the node is in "critical add-ons only" mode.
-      # This, along with the annotation above marks this pod as a critical add-on.
-      - key: CriticalAddonsOnly
-        operator: Exists
-      containers:
-      - env:
-        - name: DP_DISABLE_HEALTHCHECKS
-          value: xids
-        image: nvidia/k8s-device-plugin:1.11
-        name: nvidia-device-plugin-ctr
-        securityContext:
-          allowPrivilegeEscalation: true
-          capabilities:
-            drop: ["ALL"]
-        volumeMounts:
-          - name: device-plugin
-            mountPath: /var/lib/kubelet/device-plugins
-      volumes:
-        - name: device-plugin
-          hostPath:
-            path: /var/lib/kubelet/device-plugins
-
-

Build the K3s image

-

To build the custom image we need to build K3s because we need the generated output.

-

Put the following files in a directory:

- -

The build.sh script is configured using exports & defaults to v1.21.2+k3s1. Please set at least the IMAGE_REGISTRY variable! The script performs the following steps builds the custom K3s image including the nvidia drivers.

-

build.sh:

-
#!/bin/bash
-
-set -euxo pipefail
-
-K3S_TAG=${K3S_TAG:="v1.21.2-k3s1"} # replace + with -, if needed
-IMAGE_REGISTRY=${IMAGE_REGISTRY:="MY_REGISTRY"}
-IMAGE_REPOSITORY=${IMAGE_REPOSITORY:="rancher/k3s"}
-IMAGE_TAG="$K3S_TAG-cuda"
-IMAGE=${IMAGE:="$IMAGE_REGISTRY/$IMAGE_REPOSITORY:$IMAGE_TAG"}
-
-NVIDIA_CONTAINER_RUNTIME_VERSION=${NVIDIA_CONTAINER_RUNTIME_VERSION:="3.5.0-1"}
-
-echo "IMAGE=$IMAGE"
-
-# due to some unknown reason, copying symlinks fails with buildkit enabled
-DOCKER_BUILDKIT=0 docker build \
-  --build-arg K3S_TAG=$K3S_TAG \
-  --build-arg NVIDIA_CONTAINER_RUNTIME_VERSION=$NVIDIA_CONTAINER_RUNTIME_VERSION \
-  -t $IMAGE .
-docker push $IMAGE
-echo "Done!"
-
-

Run and test the custom image with k3d

-

You can use the image with k3d:

-
k3d cluster create gputest --image=$IMAGE --gpus=1
-
-

Deploy a test pod:

-
kubectl apply -f cuda-vector-add.yaml
-kubectl logs cuda-vector-add
-
-

This should output something like the following:

-
$ kubectl logs cuda-vector-add
-
-[Vector addition of 50000 elements]
-Copy input data from the host memory to the CUDA device
-CUDA kernel launch with 196 blocks of 256 threads
-Copy output data from the CUDA device to the host memory
-Test PASSED
-Done
-
-

If the cuda-vector-add pod is stuck in Pending state, probably the device-driver daemonset didn’t get deployed correctly from the auto-deploy manifests. In that case, you can apply it manually via kubectl apply -f device-plugin-daemonset.yaml.

-

Known issues

-
    -
  • This approach does not work on WSL2 yet. The NVIDIA driver plugin and container runtime rely on the NVIDIA Management Library (NVML) which is not yet supported. See the CUDA on WSL User Guide.
  • -
-

Acknowledgements

-

Most of the information in this article was obtained from various sources:

- -

Authors

- - - - - -
-
- - - Last update: July 5, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/guides/exposing_services/index.html b/usage/guides/exposing_services/index.html deleted file mode 100644 index 84b3fb5c..00000000 --- a/usage/guides/exposing_services/index.html +++ /dev/null @@ -1,1159 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Exposing Services - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

Exposing Services

- -

In this example, we will deploy a simple nginx webserver deployment and make it accessible via ingress.
-Therefore, we have to create the cluster in a way, that the internal port 80 (where the traefik ingress controller is listening on) is exposed on the host system.

-
    -
  1. -

    Create a cluster, mapping the ingress port 80 to localhost:8081

    -

    k3d cluster create --api-port 6550 -p "8081:80@loadbalancer" --agents 2

    -
    -

    Good to know

    -
      -
    • --api-port 6550 is not required for the example to work.
      - It’s used to have k3s‘s API-Server listening on port 6550 with that port mapped to the host system.
    • -
    • the port-mapping construct 8081:80@loadbalancer means:
      - “map port 8081 from the host to port 80 on the container which matches the nodefilter loadbalancer
        -
      • the loadbalancer nodefilter matches only the serverlb that’s deployed in front of a cluster’s server nodes
          -
        • all ports exposed on the serverlb will be proxied to the same ports on all server nodes in the cluster
        • -
        -
      • -
      -
    • -
    -
    -
  2. -
  3. -

    Get the kubeconfig file (redundant, as k3d cluster create already merges it into your default kubeconfig file)

    -

    export KUBECONFIG="$(k3d kubeconfig write k3s-default)"

    -
  4. -
  5. -

    Create a nginx deployment

    -

    kubectl create deployment nginx --image=nginx

    -
  6. -
  7. -

    Create a ClusterIP service for it

    -

    kubectl create service clusterip nginx --tcp=80:80

    -
  8. -
  9. -

    Create an ingress object for it by copying the following manifest to a file and applying with kubectl apply -f thatfile.yaml

    -

    Note: k3s deploys traefik as the default ingress controller

    -
    # apiVersion: networking.k8s.io/v1beta1 # for k3s < v1.19
    -apiVersion: networking.k8s.io/v1
    -kind: Ingress
    -metadata:
    -  name: nginx
    -  annotations:
    -    ingress.kubernetes.io/ssl-redirect: "false"
    -spec:
    -  rules:
    -  - http:
    -      paths:
    -      - path: /
    -        pathType: Prefix
    -        backend:
    -          service:
    -            name: nginx
    -            port:
    -              number: 80
    -
    -
  10. -
  11. -

    Curl it via localhost

    -

    curl localhost:8081/

    -
  12. -
-

2. via NodePort

-
    -
  1. -

    Create a cluster, mapping the port 30080 from agent-0 to localhost:8082

    -

    k3d cluster create mycluster -p "8082:30080@agent[0]" --agents 2

    -
      -
    • Note 1: Kubernetes’ default NodePort range is 30000-32767
    • -
    • -

      Note 2: You may as well expose the whole NodePort range from the very beginning, e.g. via k3d cluster create mycluster --agents 3 -p "30000-32767:30000-32767@server[0]" (See this video from @portainer)

      -
        -
      • Warning: Docker creates iptable entries and a new proxy process per port-mapping, so this may take a very long time or even freeze your system!
      • -
      -

      … (Steps 2 and 3 like above) …

      -
    • -
    -
  2. -
  3. -

    Create a NodePort service for it by copying the following manifest to a file and applying it with kubectl apply -f

    -
    apiVersion: v1
    -kind: Service
    -metadata:
    -  labels:
    -    app: nginx
    -  name: nginx
    -spec:
    -  ports:
    -  - name: 80-80
    -    nodePort: 30080
    -    port: 80
    -    protocol: TCP
    -    targetPort: 80
    -  selector:
    -    app: nginx
    -  type: NodePort
    -
    -
  4. -
  5. -

    Curl it via localhost

    -

    curl localhost:8082/

    -
  6. -
- - - - -
-
- - - Last update: June 9, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/guides/registries/index.html b/usage/guides/registries/index.html deleted file mode 100644 index 1180977f..00000000 --- a/usage/guides/registries/index.html +++ /dev/null @@ -1,1419 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Registries - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - - - - -
-
- - - - - - - -

Registries

-

Registries configuration file

-

You can add registries by specifying them in a registries.yaml and referencing it at creation time: -k3d cluster create mycluster --registry-config "/home/YOU/my-registries.yaml".

-
Pre v4.0.0 solution

Before we added the --registry-config flag in k3d v4.0.0, you had to bind-mount the file to the correct location: --volume "/home/YOU/my-registries.yaml:/etc/rancher/k3s/registries.yaml"

-
-

This file is a regular k3s registries configuration file, and looks like this:

-
mirrors:
-  "my.company.registry:5000":
-    endpoint:
-      - http://my.company.registry:5000
-
-

In this example, an image with a name like my.company.registry:5000/nginx:latest would be -pulled from the registry running at http://my.company.registry:5000.

-

Note well there is an important limitation: this configuration file will only work with k3s >= v0.10.0. It will fail silently with previous versions of k3s, but you find in the section below an alternative solution.

-

This file can also be used for providing additional information necessary for accessing some registries, like authentication and certificates.

-

Registries Configuration File embedded in k3d’s SimpleConfig

-

If you’re using a SimpleConfig file to configure your k3d cluster, you may as well embed the registries.yaml in there directly:

-
apiVersion: k3d.io/v1alpha2
-kind: Simple
-name: test
-servers: 1
-agents: 2
-registries:
-  create: true
-  config: |
-    mirrors:
-      "my.company.registry":
-        endpoint:
-          - http://my.company.registry:5000
-
-

Here, the config for the k3d-managed registry, created by the create: true flag will be merged with the config specified under config: |.

-

Authenticated registries

-

When using authenticated registries, we can add the username and password in a -configs section in the registries.yaml, like this:

-
mirrors:
-  my.company.registry:
-    endpoint:
-      - http://my.company.registry
-
-configs:
-  my.company.registry:
-    auth:
-      username: aladin
-      password: abracadabra
-
-

Secure registries

-

When using secure registries, the registries.yaml file must include information about the certificates. For example, if you want to use images from the secure registry running at https://my.company.registry, you must first download a CA file valid for that server and store it in some well-known directory like ${HOME}/.k3d/my-company-root.pem.

-

Then you have to mount the CA file in some directory in the nodes in the cluster and include that mounted file in a configs section in the registries.yaml file.
-For example, if we mount the CA file in /etc/ssl/certs/my-company-root.pem, the registries.yaml will look like:

-
mirrors:
-  my.company.registry:
-    endpoint:
-      - https://my.company.registry
-
-configs:
-  my.company.registry:
-    tls:
-      # we will mount "my-company-root.pem" in the /etc/ssl/certs/ directory.
-      ca_file: "/etc/ssl/certs/my-company-root.pem"
-
-

Finally, we can create the cluster, mounting the CA file in the path we specified in ca_file:

-
k3d cluster create \
-  --volume "${HOME}/.k3d/my-registries.yaml:/etc/rancher/k3s/registries.yaml" \
-  --volume "${HOME}/.k3d/my-company-root.pem:/etc/ssl/certs/my-company-root.pem"
-
-

Using a local registry

-

Using k3d-managed registries

-
-

Just ported!

-

The k3d-managed registry is available again as of k3d v4.0.0 (January 2021)

-
-

Create a dedicated registry together with your cluster

-
    -
  1. -

    k3d cluster create mycluster --registry-create: This creates your cluster mycluster together with a registry container called k3d-mycluster-registry

    -
      -
    • k3d sets everything up in the cluster for containerd to be able to pull images from that registry (using the registries.yaml file)
    • -
    • the port, which the registry is listening on will be mapped to a random port on your host system
    • -
    -
  2. -
  3. -

    Check the k3d command output or docker ps -f name=k3d-mycluster-registry to find the exposed port (let’s use 12345 here)

    -
  4. -
  5. Pull some image (optional) docker pull alpine:latest, re-tag it to reference your newly created registry docker tag alpine:latest k3d-mycluster-registry:12345/testimage:local and push it docker push k3d-mycluster-registry:12345/testimage:local
  6. -
  7. Use kubectl to create a new pod in your cluster using that image to see, if the cluster can pull from the new registry: kubectl run --image k3d-mycluster-registry:12345/testimage:local testimage --command -- tail -f /dev/null (creates a container that will not do anything but keep on running)
  8. -
-

Create a customized k3d-managed registry

-
    -
  1. k3d registry create myregistry.localhost --port 12345 creates a new registry called k3d-myregistry.localhost (could be used with automatic resolution of *.localhost, see next section - also, note the k3d- prefix that k3d adds to all resources it creates)
  2. -
  3. k3d cluster create newcluster --registry-use k3d-myregistry.localhost:12345 (make sure you use the k3d- prefix here) creates a new cluster set up to us that registry
  4. -
  5. continue with step 3 and 4 from the last section for testing
  6. -
- -

Using your own (not k3d-managed) local registry

-

We recommend using a k3d-managed registry, as it plays nicely together with k3d clusters, but here’s also a guide to create your own (not k3d-managed) registry, if you need features or customizations, that k3d does not provide:

-
Using your own (not k3d-managed) local registry

You can start your own local registry it with some docker commands, like:

-
docker volume create local_registry
-docker container run -d --name registry.localhost -v local_registry:/var/lib/registry --restart always -p 5000:5000 registry:2
-
-

These commands will start your registry in registry.localhost:5000. In order to push to this registry, you will need to make it accessible as described in the next section. -Once your registry is up and running, we will need to add it to your registries.yaml configuration file. -Finally, you have to connect the registry network to the k3d cluster network: docker network connect k3d-k3s-default registry.localhost. And then you can test your local registry.

-
-

Pushing to your local registry address

-

As per the guide above, the registry will be available at registry.localhost:5000.

-

All the nodes in your k3d cluster can resolve this hostname (thanks to the DNS server provided by the Docker daemon) but, in order to be able to push to this registry, this hostname also has to be resolved by your host.

-
-

nss-myhostname to resolve *.localhost

-

Luckily (for Linux users), NSS-myhostname ships with many Linux distributions -and should resolve *.localhost automatically to 127.0.0.1.
-Otherwise, it’s installable using sudo apt install libnss-myhostname.

-
-

If your system does not provide/support tools that can auto-resolve specific names to 127.0.0.1, you can manually add an entry in your /etc/hosts (c:\windows\system32\drivers\etc\hosts on Windows) file like this:

-
127.0.0.1 k3d-registry.localhost
-
-

Once again, this will only work with k3s >= v0.10.0 (see the some sections below when using k3s <= v0.9.1)

-

Testing your registry

-

You should test that you can

-
    -
  • push to your registry from your local development machine.
  • -
  • use images from that registry in Deployments in your k3d cluster.
  • -
-

We will verify these two things for a local registry (located at k3d-registry.localhost:12345) running in your development machine.
-Things would be basically the same for checking an external registry, but some additional configuration could be necessary in your local machine when using an authenticated or secure registry (please refer to Docker’s documentation for this).

-

First, we can download some image (like nginx) and push it to our local registry with:

-
docker pull nginx:latest
-docker tag nginx:latest k3d-registry.localhost:5000/nginx:latest
-docker push k3d-registry.localhost:5000/nginx:latest
-
-

Then we can deploy a pod referencing this image to your cluster:

-
cat <<EOF | kubectl apply -f -
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: nginx-test-registry
-  labels:
-    app: nginx-test-registry
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      app: nginx-test-registry
-  template:
-    metadata:
-      labels:
-        app: nginx-test-registry
-    spec:
-      containers:
-      - name: nginx-test-registry
-        image: k3d-registry.localhost:12345/nginx:latest
-        ports:
-        - containerPort: 80
-EOF
-
-

Then you should check that the pod is running with kubectl get pods -l "app=nginx-test-registry".

-

Configuring registries for k3s <= v0.9.1

-

k3s servers below v0.9.1 do not recognize the registries.yaml file as described in the in the beginning, so you will need to embed the contents of that file in a containerd configuration file.
-You will have to create your own containerd configuration file at some well-known path like ${HOME}/.k3d/config.toml.tmpl, like this:

-
config.toml.tmpl
# Original section: no changes
-[plugins.opt]
-path = "{{ .NodeConfig.Containerd.Opt }}"
-[plugins.cri]
-stream_server_address = "{{ .NodeConfig.AgentConfig.NodeName }}"
-stream_server_port = "10010"
-{{- if .IsRunningInUserNS }}
-disable_cgroup = true
-disable_apparmor = true
-restrict_oom_score_adj = true
-{{ end -}}
-{{- if .NodeConfig.AgentConfig.PauseImage }}
-sandbox_image = "{{ .NodeConfig.AgentConfig.PauseImage }}"
-{{ end -}}
-{{- if not .NodeConfig.NoFlannel }}
-  [plugins.cri.cni]
-    bin_dir = "{{ .NodeConfig.AgentConfig.CNIBinDir }}"
-    conf_dir = "{{ .NodeConfig.AgentConfig.CNIConfDir }}"
-{{ end -}}
-
-# Added section: additional registries and the endpoints
-[plugins.cri.registry.mirrors]
-  [plugins.cri.registry.mirrors."<b>registry.localhost:5000</b>"]
-    endpoint = ["http://<b>registry.localhost:5000</b>"]
-
-
-

and then mount it at /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl (where containerd in your k3d nodes will load it) when creating the k3d cluster:

-
k3d cluster create mycluster \
-    --volume ${HOME}/.k3d/config.toml.tmpl:/var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl
-
- - - - -
-
- - - Last update: June 9, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/kubeconfig/index.html b/usage/kubeconfig/index.html deleted file mode 100644 index 5b20fb6e..00000000 --- a/usage/kubeconfig/index.html +++ /dev/null @@ -1,1131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Handling Kubeconfigs - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - - - - -
-
- - - - - - - -

Handling Kubeconfigs

-

By default, k3d will update your default kubeconfig with your new cluster’s details and set the current-context to it (can be disabled).
-To get a kubeconfig set up for you to connect to a k3d cluster without this automatism, you can go different ways.

-
What is the default kubeconfig?

We determine the path of the used or default kubeconfig in two ways:

-
    -
  1. Using the KUBECONFIG environment variable, if it specifies exactly one file
  2. -
  3. Using the default path (e.g. on Linux it’s $HOME/.kube/config)
  4. -
-
-

Getting the kubeconfig for a newly created cluster

-
    -
  1. -

    Create a new kubeconfig file after cluster creation

    -
      -
    • k3d kubeconfig write mycluster
        -
      • Note: this will create (or update) the file $HOME/.k3d/kubeconfig-mycluster.yaml
      • -
      • Tip: Use it: export KUBECONFIG=$(k3d kubeconfig write mycluster)
      • -
      • Note 2: alternatively you can use k3d kubeconfig get mycluster > some-file.yaml
      • -
      -
    • -
    -
  2. -
  3. -

    Update your default kubeconfig upon cluster creation (DEFAULT)

    -
      -
    • k3d cluster create mycluster --kubeconfig-update-default
        -
      • Note: this won’t switch the current-context (append --kubeconfig-switch-context to do so)
      • -
      -
    • -
    -
  4. -
  5. -

    Update your default kubeconfig after cluster creation

    -
      -
    • k3d kubeconfig merge mycluster --kubeconfig-merge-default
        -
      • Note: this won’t switch the current-context (append --kubeconfig-switch-context to do so)
      • -
      -
    • -
    -
  6. -
  7. -

    Update a different kubeconfig after cluster creation

    -
      -
    • k3d kubeconfig merge mycluster --output some/other/file.yaml
        -
      • Note: this won’t switch the current-context
      • -
      -
    • -
    • The file will be created if it doesn’t exist
    • -
    -
  8. -
-
-

Switching the current context

-

None of the above options switch the current-context by default.
-This is intended to be least intrusive, since the current-context has a global effect.
-You can switch the current-context directly with the kubeconfig merge command by adding the --kubeconfig-switch-context flag.

-
-

Removing cluster details from the kubeconfig

-

k3d cluster delete mycluster will always remove the details for mycluster from the default kubeconfig. -It will also delete the respective kubeconfig file in $HOME/.k3d/ if it exists.

-

Handling multiple clusters

-

k3d kubeconfig merge let’s you specify one or more clusters via arguments or all via --all.
-All kubeconfigs will then be merged into a single file if --kubeconfig-merge-default or --output is specified.
-If none of those two flags was specified, a new file will be created per cluster and the merged path (e.g. $HOME/.k3d/kubeconfig-cluster1.yaml:$HOME/.k3d/cluster2.yaml) will be returned.
-Note, that with multiple cluster specified, the --kubeconfig-switch-context flag will change the current context to the cluster which was last in the list.

- - - - -
-
- - - Last update: June 9, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/usage/multiserver/index.html b/usage/multiserver/index.html deleted file mode 100644 index 843f9189..00000000 --- a/usage/multiserver/index.html +++ /dev/null @@ -1,1072 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Creating multi-server clusters - k3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - - - -
-
- - - -
-
-
- - - - -
-
-
- - - -
-
-
- - -
-
-
- - -
-
- - - - - - - -

Creating multi-server clusters

-
-

Important note

-

For the best results (and less unexpected issues), choose 1, 3, 5, … server nodes. -At least 2 cores and 4GiB of RAM are recommended.

-
-

Embedded etcd (old: dqlite)

-

Create a cluster with 3 server nodes using k3s’ embedded etcd (old: dqlite) database. -The first server to be created will use the --cluster-init flag and k3d will wait for it to be up and running before creating (and connecting) the other server nodes.

-
k3d cluster create multiserver --servers 3
-
-

Adding server nodes to a running cluster

-

In theory (and also in practice in most cases), this is as easy as executing the following command:

-
k3d node create newserver --cluster multiserver --role server
-
-
-

There’s a trap!

-

If your cluster was initially created with only a single server node, then this will fail.
-That’s because the initial server node was not started with the --cluster-init flag and thus is not using the etcd (old: dqlite) backend.

-
- - - - -
-
- - - Last update: June 9, 2021 - - - -
- - - - - - - - -
-
-
- - - - Back to top - - -
- - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file