Recommendations for using Managed Service for Kubernetes
Use these recommendations for your
PRODUCTION applications that require:
- High availability and fault tolerance.
- Load scaling.
- Resource isolation.
High availability and fault tolerance
- Use Kubernetes version 1.20 or higher and a release channel:
STABLE. Node Local DNS and Pod Topology Constraints are available in Kubernetes version 1.20.
RAPID release channel for non-production environments and faster testing of Kubernetes and Managed Service for Kubernetes updates.
Select the regional master type when creating a cluster. Kubernetes services will be available in the event of a failure at the availability zone level. The Managed Service for Kubernetes Service Level Agreement applies to the configuration with the regional master.
Deploy multiple instances of services like
StatefulSetin different availability zones. Use the Pod Topology Constraints and the AntiAffinity strategies to ensure high service availability and efficient usage of Kubernetes cluster resources.
Use combinations of the labels below for both strategies:
failure-domain.beta.kubernetes.io/zoneto keep the services available in case of availability zone failure.
failure-domain.beta.kubernetes.io/hostnameto keep the services available in the event of cluster node failure.
Test the strategies in a non-production environment before implementing them in
Use these recommendations if the load on your Managed Service for Kubernetes cluster is constantly growing:
- To make your cluster more robust, create node groups with automatic scaling in multiple availability zones.
- To reduce the load on the Kubernetes DNS, use Node Local DNS.
- To reduce horizontal traffic within a cluster, use the Network Load Balancer and the
externalTrafficPolicy:Localrule if possible.
- Consider node storage requirements in advance:
- Review disk limits for Yandex Compute Cloud.
- Load test your disk subsystem in a test environment.
- To reduce latency at high IOPS, use non-replicated disks.
Follow these recommendations for applications that use shared Kubernetes cluster resources.
Adjust the values of
requests for all cluster services:
... containers: ... resources: limits: cpu: 250m memory: 128Mi requests: cpu: 100m memory: 64Mi ...
Specify vCPU availability in thousandths and RAM in megabytes. The service will not exceed the vCPU or RAM values specified in
requests enable you to scale cluster nodes with Cluster Autoscaler.
To manage pod resources automatically, configure Kubernetes policies: