Bonjour
Si vous voulez installer k0s pour sur votre serveur voici comment faire.
Installer k0s :
Debian / CentOS :
curl -sSLf https://get.k0s.sh | sudo sh
Configurer k0s en Single Node :
k0s install controller --single
k0s start
mkdir -p /etc/k0s
k0s config create > /etc/k0s/k0s.yaml
k0s status
k0s kubectl get pods -n kube-system
k0s kubectl get pods --all-namespaces
k0s kubectl get nodes
Mettre à jour k0s :
k0s stop
curl -sSLf https://get.k0s.sh | sudo sh
k0s start
Installer Helm :
curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
Ajouter le Repo Bitnami :
helm repo add bitnami https://charts.bitnami.com/bitnami
Installer une Application depuis Helm :
helm repo update
helm install bitnami/wordpress --generate-name
Installer un Pod Nginx :
k0s kubectl run nginx --image=nginx --restart=Never
k0s kubectl get pods -o wide
Lister les Replicatset : (Optionnel)
k0s kubectl get replicaset
NAME DESIRED CURRENT READY AGE
mongo-7d96cb4cf 1 1 1 4h54m
nginx-855cd89957 1 1 0 5h1m
Supprimer un Replicatset : (Optionnel)
k0s kubectl delete replicaset nginx-855cd89957
Version courte
k0s kc delete rs nginx-855cd89957
Lister vos Alias : (Optionnel)
alias
Exemple :
alias cp='cp -i'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias mv='mv -i'
alias rm='rm -i'
alias xzegrep='xzegrep --color=auto'
alias xzfgrep='xzfgrep --color=auto'
alias xzgrep='xzgrep --color=auto'
alias zegrep='zegrep --color=auto'
alias zfgrep='zfgrep --color=auto'
alias zgrep='zgrep --color=auto'
Ajouter un Alias : (Optionnel)
echo alias kc="k0s kc" >> /root/.bashrc
echo alias kubectl="k0s kubectl" >> /root/.bashrc
Voilà vous avez installé k0s.