This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
система_kubernetes [2026/11/09 18:26] val [Volumes] |
система_kubernetes [2026/11/10 20:51] (current) val [Deployment] |
||
|---|---|---|---|
| Line 869: | Line 869: | ||
| # image: gowebd | # image: gowebd | ||
| - | # imagePullPolicy: "IfNotPresent" | + | # imagePullPolicy: "Always" # for tag latest |
| # lifecycle: | # lifecycle: | ||
| Line 928: | Line 928: | ||
| # args: | # args: | ||
| # - | | # - | | ||
| - | # test -d /mnt/img/ && exit 0 | + | # #test -d /mnt/img/ && exit 0 |
| # mkdir /mnt/img; cd /mnt/img | # mkdir /mnt/img; cd /mnt/img | ||
| # curl http://val.bmstu.ru/unix/Media/logo.gif > logo.gif | # curl http://val.bmstu.ru/unix/Media/logo.gif > logo.gif | ||
| Line 997: | Line 997: | ||
| * [[#Metrics Server]] | * [[#Metrics Server]] | ||
| - | * Пакет OpenSSL [[Пакет OpenSSL#Проверка производительности CPU]] | + | * Пакет OpenSSL [[Пакет OpenSSL#Проверка производительности CPU]] или [[Анализ производительности системы#Стресс тестирование и выявление нагрузки на CPU]] |
| <code> | <code> | ||
| Line 1703: | Line 1703: | ||
| name: my-pv-kube3-sz-128m-num-001 | name: my-pv-kube3-sz-128m-num-001 | ||
| spec: | spec: | ||
| - | # storageClassName: my-ha-sc | + | storageClassName: my-ha-sc |
| capacity: | capacity: | ||
| storage: 128Mi | storage: 128Mi | ||
| Line 1741: | Line 1741: | ||
| <code> | <code> | ||
| + | kube1:~/pv# mkdir -p my-ha-pv-chart/templates/ | ||
| + | |||
| kube1:~/pv# cat my-ha-pv-chart/Chart.yaml | kube1:~/pv# cat my-ha-pv-chart/Chart.yaml | ||
| </code><code> | </code><code> | ||
| Line 1790: | Line 1792: | ||
| kube1# kubectl get pv | kube1# kubectl get pv | ||
| - | kube1:~/pv# ###helm uninstall my-ha-pv-chart | + | kube1# helm list |
| + | |||
| + | kube1# ###helm uninstall my-ha-pv-chart | ||
| </code><code> | </code><code> | ||
| kube1:~/pywebd-k8s# cat my-webd-pvc.yaml | kube1:~/pywebd-k8s# cat my-webd-pvc.yaml | ||
| Line 2054: | Line 2058: | ||
| - name: my-webd | - name: my-webd | ||
| image: server.corpX.un:5000/student/pywebd:ver1.2 | image: server.corpX.un:5000/student/pywebd:ver1.2 | ||
| - | imagePullPolicy: "Always" | + | imagePullPolicy: "IfNotPresent" |
| # env: | # env: | ||
| Line 2171: | Line 2175: | ||
| # ###wget https://get.helm.sh/helm-v3.16.4-linux-amd64.tar.gz | # ###wget https://get.helm.sh/helm-v3.16.4-linux-amd64.tar.gz | ||
| # wget https://get.helm.sh/helm-v4.0.4-linux-amd64.tar.gz | # wget https://get.helm.sh/helm-v4.0.4-linux-amd64.tar.gz | ||
| + | # ###wget https://get.helm.sh/helm-v4.3.1-linux-amd64.tar.gz | ||
| # tar -zxvf helm-*-linux-amd64.tar.gz | # tar -zxvf helm-*-linux-amd64.tar.gz | ||
| Line 2279: | Line 2284: | ||
| image: | image: | ||
| repository: server.corpX.un:5000/student/webd | repository: server.corpX.un:5000/student/webd | ||
| - | pullPolicy: Always | + | pullPolicy: Always # for tag latest |
| ... | ... | ||
| serviceAccount: | serviceAccount: | ||
| Line 2481: | Line 2486: | ||
| namespace = "{{.Release.Namespace}}" | namespace = "{{.Release.Namespace}}" | ||
| image = "alpine" | image = "alpine" | ||
| - | privileged = true #insert this | + | privileged = true #insert this, no need if kaniko |
| ... | ... | ||
| securityContext: | securityContext: | ||
| - | allowPrivilegeEscalation: true #change this | + | allowPrivilegeEscalation: true #change this, no need if kaniko |
| readOnlyRootFilesystem: false | readOnlyRootFilesystem: false | ||
| runAsNonRoot: true | runAsNonRoot: true | ||
| - | privileged: true #change this | + | privileged: true #change this, no need if kaniko |
| ... | ... | ||
| #volumeMounts: [] #comment this | #volumeMounts: [] #comment this | ||
| Line 2502: | Line 2507: | ||
| ... | ... | ||
| </code><code> | </code><code> | ||
| + | kube1:~/gitlab-runner# helm template gitlab-runner gitlab/gitlab-runner -f values.yaml -n gitlab-runner --version 0.70.5 | ||
| + | |||
| kube1:~/gitlab-runner# helm upgrade -i gitlab-runner gitlab/gitlab-runner -f values.yaml -n gitlab-runner --version 0.70.5 | kube1:~/gitlab-runner# helm upgrade -i gitlab-runner gitlab/gitlab-runner -f values.yaml -n gitlab-runner --version 0.70.5 | ||