k3d創建集羣並暴露traefik端口

1. 安裝docker

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

 

2. 安裝k3d

wget -q -O - https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash

在環境變量加入以下配置,進行鏡像加速

export K3D_DOCKER_OPTIONS="--registry-mirror=https://8km017g6.mirror.aliyuncs.com"

 

3. 創建k3d集羣

k3d cluster create

kubectl get all --all-namespaces

kubectl get nodes

kubectl cluster-info

 

4. 暴露traefik端口

kubectl -n kube-system port-forward $(kubectl -n kube-system get pods --selector "app.kubernetes.io/name=traefik" --output=name) --address 0.0.0.0 9000:9000

打開頁面:http://localhost:9000/dashboard/#/

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章