Skip to content

Instantly share code, notes, and snippets.

@smijar
Last active January 9, 2024 17:38
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save smijar/15b81f9abe566a602c7caafc25d927dc to your computer and use it in GitHub Desktop.
k3d create cluster without traefik and serverlb
# Possibly obsolete: k3d create --name testcls1 --workers 3
k3d create --name testcls1 --workers 3 --server-arg "--no-deploy=traefik" --server-arg "--no-deploy=servicelb"
# UPDATE: in newer versions onwards, this has evolved to (thanks to comments below):
k3d cluster create --k3s-arg "--no-deploy=traefik@server:*"
@smijar
Copy link
Author

smijar commented Apr 17, 2020

ref

https://blog.alexellis.io/openfaas-cloud-for-development/

context

export KUBECONFIG="$(k3d get-kubeconfig --name='testcls1')"
OR copy it to the ~/.kube/config folder
cp /Users//.config/k3d/testcls1/kubeconfig.yaml ~/.kube/config

install

brew install k3d

create cluster with port 80 exposed to host for ingress/lb for service(s) of type Loadbalancer

k3d create --publish 8080:8080 --name testcls1 --workers 3

create cluster without traefik and servicelb

k3d create --name testcls1 --workers 3 --server-arg "--no-deploy=traefik" --server-arg "--no-deploy=servicelb"

list clusters

k3d list

delete cluster

k3d delete --name testcls1

start cluster

k3d start testcls1

stop cluster

k3d stop testcls1

@dargmuesli
Copy link

dargmuesli commented Nov 25, 2021

In version 5 it looks to be k3d create --name testcls1 --workers 3 --k3s-arg "--disable=traefik@server:0"

@smijar
Copy link
Author

smijar commented Nov 29, 2021

Really appreciate the comment - I have updated the gist.

@liyihuang
Copy link

btw --name or --worker syntax doesn't work for me. what I really works for me k3d cluster create test --k3s-arg "--disable=traefik@server:0"

@lamida
Copy link

lamida commented Oct 27, 2022

Based on k3d-io/k3d#292 (comment) now must use k3d cluster create --k3s-arg "--no-deploy=traefik@server:*"

@smijar
Copy link
Author

smijar commented Oct 27, 2022

Thank you - I have updated as mentioned.

@AmilcarM11
Copy link

It seems that --no-deploy has been deprecated. k3s-io/k3s#1382

k3d now recommends using --disable instead, like this:

k3d cluster create --k3s-arg "--disable=traefik@server:*" <cluster-name>

I am using

k3d version v5.4.8
k3s version v1.25.6-k3s1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment