91 lines
2.3 KiB
Markdown
91 lines
2.3 KiB
Markdown
Upgrade:
|
|
|
|
```
|
|
export KV=1.26.0-00;
|
|
apt-mark unhold kubeadm=$KV kubectl=$KV kubelet=$KV;
|
|
apt install -y kubeadm=$KV;
|
|
```
|
|
|
|
```
|
|
kubeadm upgrade node #Other pines in the wood
|
|
```
|
|
|
|
```
|
|
#pine01
|
|
kubeadm upgrade plan --ignore-preflight-errors=CoreDNSUnsupportedPlugins;
|
|
kubeadm config images pull;
|
|
kubeadm upgrade apply ${KV/\-*/} --ignore-preflight-errors=CoreDNSUnsupportedPlugins --certificate-renewal=false; #sometimes true
|
|
```
|
|
|
|
```
|
|
apt install kubectl=$KV kubelet=$KV;
|
|
systemctl daemon-reload && systemctl restart kubelet;
|
|
apt-mark hold kubeadm=$KV kubectl=$KV kubelet=$KV;
|
|
echo 'You can now uncordon, der Geraet';
|
|
```
|
|
|
|
|
|
|
|
# Infos:
|
|
|
|
```
|
|
$ kubectl -n kube-system get cm kubeadm-config -o yaml
|
|
apiVersion: v1
|
|
data:
|
|
ClusterConfiguration: |
|
|
apiServer:
|
|
extraArgs:
|
|
authorization-mode: Node,RBAC
|
|
timeoutForControlPlane: 4m0s
|
|
apiVersion: kubeadm.k8s.io/v1beta3
|
|
certificatesDir: /etc/kubernetes/pki
|
|
clusterName: kubernetes
|
|
controllerManager: {}
|
|
dns: {}
|
|
etcd:
|
|
local:
|
|
dataDir: /var/lib/etcd
|
|
imageRepository: registry.k8s.io
|
|
kind: ClusterConfiguration
|
|
kubernetesVersion: v1.23.15
|
|
networking:
|
|
dnsDomain: cluster.local
|
|
podSubnet: 172.23.0.0/16
|
|
serviceSubnet: 10.96.0.0/12
|
|
scheduler: {}
|
|
ClusterStatus: |
|
|
apiEndpoints:
|
|
pine01:
|
|
advertiseAddress: 172.16.23.21
|
|
bindPort: 6443
|
|
apiVersion: kubeadm.k8s.io/v1beta2
|
|
kind: ClusterStatus
|
|
kind: ConfigMap
|
|
metadata:
|
|
creationTimestamp: "2021-01-20T14:55:12Z"
|
|
managedFields:
|
|
- apiVersion: v1
|
|
fieldsType: FieldsV1
|
|
fieldsV1:
|
|
f:data:
|
|
.: {}
|
|
f:ClusterConfiguration: {}
|
|
f:ClusterStatus: {}
|
|
manager: kubeadm
|
|
operation: Update
|
|
time: "2021-01-20T14:55:12Z"
|
|
name: kubeadm-config
|
|
namespace: kube-system
|
|
resourceVersion: "441685033"
|
|
uid: c70fefd3-02c3-44c8-a37d-7b17ec445455
|
|
```
|
|
|
|
|
|
|
|
Descheduler (reschedule pods)
|
|
# https://github.com/kubernetes-sigs/descheduler
|
|
# kubectl apply -n kube-system -f https://raw.githubusercontent.com/kubernetes-sigs/descheduler/master/kubernetes/base/rbac.yaml
|
|
# kubectl apply -n kube-system -f https://raw.githubusercontent.com/kubernetes-sigs/descheduler/master/kubernetes/base/configmap.yaml
|
|
# kubectl apply -n kube-system -f https://raw.githubusercontent.com/kubernetes-sigs/descheduler/master/kubernetes/job/job.yaml
|
|
|