Who Should Use K3s?
-
Developers building Kubernetes-based apps locally
-
Edge & IoT deployments
-
Lightweight clusters for testing or CI/CD
-
Anyone needing Kubernetes with less complexity
2.Check Cluster Status
k3s kubectl get pods -A # View all pods across namespaces
(Optional) Enable kubeconfig for your user.
3.Deploy an Application
Create a simple deployment:
k3s kubectl create deployment nginx --image=nginx
Expose it with a service:
k3s kubectl expose deployment nginx --type=NodePort
--port=80
Find the assigned port:
k3s kubectl get svc nginx
4.Enable Traefik Ingress
K3s comes with Traefik as the default ingress
controller. To check its status:
k3s kubectl get pods -n kube-system | grep traefik
You can create an Ingress rule to expose your applications.
How to Uninstall K3s?
If you want to remove K3s from your system:
🔸 On the Master Node:
/usr/local/bin/k3s-uninstall.sh
🔸 On Worker Nodes:
/usr/local/bin/k3s-agent-uninstall.sh
Local Storage → HostPath (default in K3s).
Flannel (Default in K3s) →
Simple overlay network.
No comments:
Post a Comment