K8s
https://kubesphere.io/zh/learn/level_1/lesson_2/video/
https://v2-1.docs.kubesphere.io/docs/introduction/what-is-kubesphere/#open-source
https://github.com/openshift/openshift-docs
https://new.qq.com/omn/20220207/20220207A04MM800.html
microk8s status --wait-ready
microk8s enable dashboard dns ingress
microk8s kubectl get all --all-namespaces
echo "alias kubectl='microk8s kubectl'" > .bash_aliases
source .bash_aliases
kubectl get nodes
microk8s start
microk8s stop
microk8s dashboard-proxy
microk8s.reset
sudo snap disable microk8s
sudo snap remove microk8s
Deploy kafka on microk8s with helm and strimzi
https://developer.lightbend.com/guides/akka-data-pipelines-iot-sensor-tutorial/set-up.html
https://developer.lightbend.com/docs/cloudflow/current/install/how-to-install-and-use-strimzi.html
Minikube
install minikube https://minikube.sigs.k8s.io/docs/start/
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
echo "alias kubectl='minikube kubectl'" > .bash_aliases
source .bash_aliases
uninstall minikube
minikube stop; minikube delete
docker stop
docker ps -aq
rm -r ~/.kube ~/.minikube
sudo rm /usr/local/bin/localkube /usr/local/bin/minikube
systemctl stop '*kubelet*.mount'
sudo rm -rf /etc/kubernetes/
docker system prune -af --volumes
https://strimzi.io/docs/operators/latest/quickstart.html
https://strimzi.io/quickstarts/
Statefulsets - mysql
https://www.magalix.com/blog/kubernetes-and-database
https://v2-1.docs.kubesphere.io/docs/quick-start/mysql-deployment/
Kubectl commands
list topics in a namespace
kubectl get kt -n namespace name
kubectl get kt -n my-kafka-project
describe pod
kubectl describe pod -n namespace pod
kubectl describe pod -n my-kafka-project my-cluster-kafka-0
list pods in namespace
kubectl get pods --all-namespaces
kubectl get pods -n <namespace>
list everything in namespace
kubectl get all -n <namespace>
check pod logs
kubectl -n my-kafka-project logs my-cluster-kafka-0
kubectl -n <namespace> loges <pod>