https://microk8s.io/docs/getting-started
Installer
sudo snap install microk8s --classic
Lister les servvces
microk8s kubectl get services
Lister les pods
microk8s kubectl get pods
Pousser une image docker vers un repo
microk8s enable registry
docker tag d17287c3708f localhost:32000/jupyter:1
docker push localhost:32000/jupyter:1
Créer un deploiement
microk8s kubectl create deployment jupyter --image=localhost:32000/jupyter:1
Deployer
microk8s kubectl scale deployment jupyter 1
Lister les images (et leur taille)
microk8s ctr images ls
Proxy dashboard (accessible en remote)
microk8s dashboard-proxy
microk8s kubectl port-forward -n kube-system service/kubernetes-dashboard 10443:443
Delete a pod
microk8s kubectl delete pods <podname>
Appliquer un changement
microk8s kubectl apply -f volume.yml
Créer un volume persistant
apiVersion: v1
kind: PersistentVolume
metadata:
name: streamlit-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/home/clement/appstreamlit"