Skip to content

[WSL2] K3s and Kubernetes support #4203

@ibuildthecloud

Description

@ibuildthecloud

k3s is simple, lightweight distribution of Kubernetes. To run k3s on WSL2 the following kernel settings are missing. These will be needed for most any Kubernetes setup, so this is not specific to k3s.

CONFIG_BRIDGE_NETFILTER=y
CONFIG_NETFILTER_XT_MATCH_COMMENT=y
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
CONFIG_NETFILTER_XT_MATCH_OWNER=y
CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y
CONFIG_VXLAN=y
CONFIG_GENEVE=y

I was able to get k3s and rio (which uses istio, knative, prometheus, grafana, kiali, and lot of other things) with these steps. https://gist.github.com/ibuildthecloud/1b7d6940552ada6d37f54c71a89f7d00

While I only included the CONFIG_NETFILTER_XT_MATCH_* parameters Kubernetes specifically needs, it might be worth it to just include all the default xt_match options. It is going to continually pop up that people want different iptables modules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wsl2Issue/feature applies to WSL 2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions