User Tools

Site Tools


система_kubernetes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
система_kubernetes [2026/03/11 18:40]
val [Metrics Server]
система_kubernetes [2026/03/15 09:53] (current)
val [Gateway API]
Line 1442: Line 1442:
     protocol: HTTP     protocol: HTTP
   - name: https   - name: https
-    hostname: "ehwebd.corpX.un"​+    hostname: "webd.corpX.un"​
     protocol: HTTPS     protocol: HTTPS
 #    port: 8443 #    port: 8443
Line 1450: Line 1450:
       certificateRefs:​       certificateRefs:​
         - kind: Secret         - kind: Secret
-          name: ehwebd-tls+          name: webd-tls
 </​code>​ </​code>​
  
Line 1463: Line 1463:
 spec: spec:
   hostnames:   hostnames:
-  - ehwebd.corpX.un+  - webd.corpX.un
   parentRefs:   parentRefs:
 #  - name: my-gateway #  - name: my-gateway
Line 1482: Line 1482:
     - name: my-webd     - name: my-webd
       port: 80       port: 80
 +#      weight: 70
 +#    - name: my-webd2
 +#      port: 80
 +#      weight: 30
 +
 </​code>​ </​code>​
 ==== Volumes ==== ==== Volumes ====
Line 2577: Line 2582:
   ИЛИ   ИЛИ
 kube1:​~/​users#​ kubectl delete clusterrolebindings user1-cluster-admin kube1:​~/​users#​ kubectl delete clusterrolebindings user1-cluster-admin
 +</​code>​
 +
 +===== Horizontal Pod Autoscaler =====
 +
 +  * [[#Metrics Server]]
 +
 +<​code>​
 +kube1:​~/​webd-k8s#​ cat my-webd-deployment.yaml
 +</​code><​code>​
 +...
 +        resources:
 +          requests:
 +            memory: "​64Mi"​
 +            cpu: "​250m"​
 +</​code><​code>​
 +kube1:​~/​webd-k8s#​ cat my-webd-hpa.yaml
 +</​code><​code>​
 +apiVersion: autoscaling/​v2
 +kind: HorizontalPodAutoscaler
 +metadata:
 +  name: my-webd-hpa
 +spec:
 +  scaleTargetRef:​
 +    apiVersion: apps/v1
 +    kind: Deployment
 +    name: my-webd
 +  minReplicas:​ 2
 +  maxReplicas:​ 10
 +  metrics:
 +  - type: Resource
 +    resource:
 +      name: cpu
 +      target:
 +        type: Utilization
 +        averageUtilization:​ 50
 +  - type: Resource
 +    resource:
 +      name: memory
 +      target:
 +        type: Utilization
 +        averageUtilization:​ 80
 +</​code><​code>​
 +kube1:​~/​webd-k8s#​ kubectl -n my-ns get hpa
 </​code>​ </​code>​
  
система_kubernetes.1773243620.txt.gz · Last modified: 2026/03/11 18:40 by val