1.052
Bearbeitungen
Zeile 380: | Zeile 380: | ||
Das Installations Manifest für den Metrics-Server herunterladen:<syntaxhighlight lang="bash"> | Das Installations Manifest für den Metrics-Server herunterladen:<syntaxhighlight lang="bash"> | ||
curl -LO https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml | curl -LO https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml | ||
</syntaxhighlight> | </syntaxhighlight><code>- --kubelet-insecure-tls</code> in deployment.spec.template.spec.containers.args<syntaxhighlight lang="bash" line="1"> | ||
apiVersion: apps/v1 | |||
kind: Deployment | |||
metadata: | |||
labels: | |||
k8s-app: metrics-server | |||
name: metrics-server | |||
namespace: kube-system | |||
spec: | |||
selector: | |||
matchLabels: | |||
k8s-app: metrics-server | |||
strategy: | |||
rollingUpdate: | |||
maxUnavailable: 0 | |||
template: | |||
metadata: | |||
labels: | |||
k8s-app: metrics-server | |||
spec: | |||
containers: | |||
- args: | |||
- --cert-dir=/tmp | |||
- --secure-port=4443 | |||
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname | |||
- --kubelet-use-node-status-port | |||
- --metric-resolution=15s | |||
- --kubelet-insecure-tls # Hinzufügen | |||
</syntaxhighlight><syntaxhighlight lang="bash"> | |||
kubectl apply -f components.yaml | kubectl apply -f components.yaml | ||
</syntaxhighlight><nowiki>###############################</nowiki> | </syntaxhighlight>Metrics-Server testen:<syntaxhighlight lang="bash"> | ||
kubectl top nodes | |||
</syntaxhighlight>Ausgabe:<syntaxhighlight lang="bash"> | |||
NAME CPU(cores) CPU% MEMORY(bytes) MEMORY% | |||
k8s-ctrlr-1 105m 5% 1045Mi 28% | |||
k8s-worker-1 27m 1% 471Mi 12% | |||
k8s-worker-2 42m 2% 481Mi 13% | |||
</syntaxhighlight> | |||
<nowiki>###############################</nowiki> | |||
<nowiki>###</nowiki>Speziell gitlab | <nowiki>###</nowiki>Speziell gitlab |