minikube is local Kubernetes, focusing on making it easy to learn and develop for Kubernetes. All you need is Docker (or similarly compatible) container or a Virtual Machine environment, and Kubernetes is a single command away: minikube start
The Kubernetes command-line tool, kubectl, allows you to run commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs. Install kubectl on Linux:
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
cp kubectl /usr/local/bin/
chmod +x /usr/local/bin/kubectlIn some cases you need these packages:
apt install -y socat
apt install -y apt-transport-https
apt install -y conntrack
#apt install -y virtualbox virtualbox-ext-packTo install the latest minikube stable release on x86-64 Linux using binary download:
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
install minikube-linux-amd64 /usr/local/bin/minikubeIn my case I set up these very useful aliases (~/.bashrc) and autocompletion:
cat <<EOF >> ~/.bashrc
alias k='kubectl'
alias kga='watch -x kubectl get all -o wide'
alias kgad='watch -dx kubectl get all -o wide'
alias kcf='kubectl create -f'
alias wk='watch -x kubectl'
alias wkd='watch -dx kubectl'
alias kd='kubectl delete'
alias kcc='kubectl config current-context'
alias kcu='kubectl config use-context'
alias kg='kubectl get'
alias kdp='kubectl describe pod'
alias kdes='kubectl describe'
alias kdd='kubectl describe deployment'
alias kds='kubectl describe svc'
alias kdr='kubectl describe replicaset'
alias kk='k3s kubectl'
alias vk='kubectl --kubeconfig'
alias kcg='kubectl config get-contexts'
alias kgaks='watch -x kubectl get all -o wide -n kube-system'
alias kapi='kubectl api-resources'
alias kgaing='watch -x kubectl get all -n ingress-nginx -o wide'
EOFI use these aliases for minikube,k3s,k3d,vcluster
You have to (maybe there are other solutions) run cluster on non-root users(in my case ubuntu):
usermod -aG sudo ubuntuAnd then run "visudo" and add:
ubuntu ALL=(ALL) NOPASSWD:ALLSave the sudoers file and run:
sudo usermod -aG docker $USER && newgrp dockerFrom a terminal with administrator access (but not logged in as root), run:
minikube start
systemctl enable kubelet.serviceIf minikube fails to start, see the drivers drivers page for help setting up a compatible container or virtual-machine manager.Your command will look like:
minikube start --vm-driver=noneLet's see what we have done till now:
k cluster-info
kubectl get pods -A
#OR
minikube kubectl -- get pods -A- Dashboard
- Nodes
- Services
- DaemonSets
- Job-CronJob
- Init Container
- PV-PVC
- Secrets
- ConfigMaps
- ResourceQuota
- NFS
- Statefulsets
- Helm
- Kustomize
- HPA
- VPA
- RemoteAccessToCluster
- DevSpace
- NameSpaceStuckIntoTermination
- kubefwd
- Kind , ParseChart , ArgoCD , Vcluster , Devspace-Vcluster-Argocd-prod , Nomad , Bitnami-charts , Okteto , Autoscaler , Tilt , NFS Subdir External Provisioner
Have fun!
