You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/operator-service-manager/get-started-with-cluster-registry.md
+72-13Lines changed: 72 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,19 +3,20 @@ title: Get started with Azure Operator Service Manager cluster registry
3
3
description: Azure Operator Service Manager cluster registry provides a locally resilent edge registry service to host Nexus K8s container image artifacts.
4
4
author: msftadam
5
5
ms.author: adamdor
6
-
ms.date: 09/06/2024
6
+
ms.date: 10/16/2024
7
7
ms.topic: get-started
8
8
ms.service: azure-operator-service-manager
9
9
---
10
10
11
11
# Get started with cluster registry
12
-
* Original Author: Tobias Weisserth
13
12
* Original Publish Date: July 26, 2024
13
+
* Updated for HA: October 16, 2024
14
14
15
15
## Overview
16
16
Improve resiliency for cloud native network functions with Azure Operator Service Manager cluster registry. This feature requires the following minimum environment:
17
-
* AOSM ARM API Version: 2023-09-01
18
-
* AOSM CNF Arc for Kubernetes Extension Build Number: 1.0.2711-7
17
+
* Minimum AOSM ARM API Version: 2023-09-01
18
+
* No HA Minimum AOSM CNF Arc for Kubernetes Extension Build Number: 1.0.2711-7
19
+
* With HA Minimum AOSM CNF Arc for Kubernetes Extension Build Number: 2.0.2810-144
19
20
20
21
## Introduction
21
22
Azure Operator Service Manager (AOSM) cluster registry (CR) enables a local copy of container images in the Nexus K8s cluster. When the containerized network function (CNF) is installed with cluster registry enabled, the container images are pulled from the remote AOSM artifact store and saved to a local registry. With cluster register, CNF access to container images survives loss of connectivity to the remote artifact store.
@@ -29,21 +30,79 @@ In the above scenarios, if there's a temporary issue with accessing the AOSM art
29
30
30
31
## How cluster registry works
31
32
AOSM cluster registry is enabled using the Network Function Operator Arc K8s extension. The following CLI shows how cluster registry is enabled on a Nexus K8s cluster.
When the cluster registry feature is enabled in the Network Function Operator Arc K8s extension, any container images deployed from AOSM artifact store are accessible locally in the Nexus K8s cluster. The user can choose the persistent storage size for the cluster registry.
36
57
37
58
> [!NOTE]
38
59
> If the user doesn't provide any input, a default persistent volume of 100 GB is used.
39
60
40
-
## Frequently Asked Questions
61
+
## High availability and resiliency considerations
62
+
The AOSM NF extension relies on the AOSM webhook and edge registry to offer two key features: onboarding helm charts without changes and a local registry on the cluster that speeds up pod creation during scaling and rescheduling and allows disconnection from remote registry. These components are essential for these purposes, and they need to be highly-available and resilient. Here are the design considerations for these aspects of AOSM.
41
63
42
-
### Can I use AOSM cluster registry with a CNF application previously deployed?
43
-
If there's a CNF application already deployed without cluster registry, the container images are not available automatically. The cluster registry must be enabled before deploying the network function with AOSM.
64
+
### Summary of changes for HA
65
+
For high availability both cluster registry and webhook are configured with at least 3 replicas and up to 5 replicas (when horizontal auto scaling is enabled). An upgrade strategy of gradual rollout is configured. PodDisruptionBudgets are used for availability during voluntary disruptions. Pod Anti-affinity is used to spread pods evenly across nodes. Readiness probe is configured for cluster registry to make sure pods are ready before serving traffic. For resiliency AOSM workload pods are assigned to the system node pool. Pods are configured to scale horizontally under CPU and memory load.
44
66
45
-
### Which Nexus K8s storage class is used?
46
-
AOSM cluster registry feature uses nexus-volume storage class to store the container images in the Nexus Kubernetes cluster. By default, a 100-GB persistent volume is created if the user doesn't specify the size of the cluster registry.
67
+
#### Replicas
68
+
* Running multiple copies(replicas) of an application provides the first level of redundancy for any application. Both edge registry and webhook are defined as kind:deployment with minimum 3 replicas.
69
+
#### DeploymentStrategy
70
+
* We are using a rollingUpdate strategy which helps with zero downtime upgrade and does gradual rollout of applications, with maxUnavailable as “1” only one pod will be taken down at a time before a new pod of new version is created thereby maintaining enough replicas for redundancy.
71
+
#### Pod Disruption Budget
72
+
* A PodDisruptionBudget (PDB) protects your pods from voluntary disruption, which can happen if nodes are drained for maintenance or during upgrades. It is deployed beside your Deployment, ReplicaSet or StatefulSet increasing your application’s availability. This is done by specifying either the minAvailable or maxUnavailable setting for a PDB. For AOSM operator pods a PodDisruptionBudget with minAvailable of 2 is used.
73
+
#### Pod Anti affinity
74
+
* The PodDisruptionBudget guarantees that a certain amount of your application pods is available. A pod anti-affinity guarantees the distribution of the pods across different nodes in your Kubernetes cluster. PodAntiAffinity requires 3 parameters:
75
+
* A scheduling mode that allows you to define how strictly the rule is enforced
76
+
* requiredDuringSchedulingIgnoredDuringExecution(Hard): Pods must be scheduled in a way that satisfies the defined rule. If no topologies that meet the rule's requirements are available, the
77
+
pod will not be scheduled at all. It will remain in a pending state until a suitable node becomes available. Combined with a PDB this can also lead to a deadlock
78
+
* preferredDuringSchedulingIgnoredDuringExecution(Soft): This rule type is more flexible. It expresses a preference for scheduling pods based on the defined rule but doesn't enforce a strict requirement. If topologies that meet the preference criteria are available, Kubernetes will try to schedule the pod there. However, if no such topologies are available, the pod can still be scheduled on other nodes that do not meet the preference. When using this parameter, you also have to pass a weight parameter (a number between 1-100 ,1 being lowest and 100 highest) that defines affinity priority when you specify multiple rules.
79
+
* A Label Selector used to target specific pods for which the affinity will be applied.
80
+
* A Topology Key that defines the key that the node needs to share to define a Topology. You can use any node label for this parameter. Common examples of topology keys are:
81
+
* kuberetes.io/hostname - Pods scheduling is based on node hostnames.
82
+
* kubernetes.io/arch - Pods scheduling is based on node CPU architectures.
83
+
* topology.kubernetes.io/zone - Pods scheduling is based on availability zones.
84
+
* topology.kubernetes.io/region - Pods scheduling is based on node regions.
85
+
* Nexus node placement is spread evenly across zones(racks) by design so spreading the pods across nodes will also give zonal redundancy.( conceptsnexus-kubernetes-placement). For AOSM operator pods a soft anti-affinity with weight 100 and topologyKe based on node hostnames is used
86
+
#### Storage
87
+
* Since AOSM edge registry has multiple replicas which are spread across nodes the persistent volume needs to support “ReadWriteMany” access mode (pods from multiple nodes can read and write), we are using “nexusshared” volume which is available on Nexus clusters and supports RWX access mode.
88
+
#### Monitoring via Readiness Probes
89
+
* The kubelet uses readiness probes to know when a container is ready to start accepting traffic. A Pod is considered ready when all containers are ready. When a Pod is not ready, it is removed from Service load balancers. Cluster registry is configured with readiness probe (http probe) to prevent taking traffic when pod is not ready.
90
+
#### System node pool
91
+
* All AOSM operator pods are assigned to system node pools which host critical system pods. This prevents misconfigured or rouge application pods from impacting system pods.
92
+
#### Horizontal scaling
93
+
* In Kubernetes, a HorizontalPodAutoscaler automatically updates a workload resource (such as a Deployment or StatefulSet), with the aim of automatically scaling the workload to match demand. Horizontal scaling means that the response to increased load is to deploy more pods. If the load decreases, and the number of Pods is above the configured minimum, the HorizontalPodAutoscaler instructs the workload resource (the Deployment, StatefulSet, or other similar resource) to scale back down. AOSM operator pods have a HPA configured with minimum replicas of 3 and maximum replicas of 5 with targetAverageUtilization of cpu and memory as 80%.
94
+
#### Resource limits
95
+
* A very important factor in HA is to not overload the nodes your pods are running on. If you do not take preventative steps, a memory leak in one of your applications for example could bring down your entire production environment. Because there is no way for the Kubernetes scheduler to know how much resource your application is going to use before it is scheduled, you need to provide this information beforehand. If you do not, there is nothing stopping a pod from using all the available resources on a node. There are two pieces of information that must be provided for both CPU and memory:
96
+
***Resource request** - The minimum amount that should be reserved for a pod. This should be set to resource usage under normal load for your application.
97
+
***Resource limit** - The maximum amount that a pod should ever use, if usage reaches the limit it will be terminated.
98
+
All AOSM operator containers are configured with appropriate request, limit for CPU and memory.
99
+
#### Known HA Limitations
100
+
* NAKS clusters with single active system agent pool may not be suitable for highly available edge registry and webhook due to single system node crash bringing down all pods at the same time. Recommendation from Nexus for production workloads is to use at least 3 nodes for system agent pool.
101
+
* The nexus-shared storage class is backed by an NFS storage service. This NFS storage service is available per Cloud Service Network (CSN). Any Nexus Kubernetes cluster attached to the CSN can provision persistent volume from this shared storage pool. The storage pool is currently limited to a maximum size of 1TiB as of NC 3.10, NC 3.12 will have a 16TiB option.
102
+
* Pod Anti affinity only deals with the initial placement of pods and ubsequent pod scaling and repair follows standard k8s scheduling logic.
47
103
48
-
### Can I change the storage size after a deployment?
49
-
Storage size can't be modified after the initial deployment. We recommend configuring the volume size by 3x to 4x of the starting size.
104
+
## Frequently Asked Questions
105
+
* Can I use AOSM cluster registry with a CNF application previously deployed?
106
+
* If there's a CNF application already deployed without cluster registry, the container images are not available automatically. The cluster registry must be enabled before deploying the network function with AOSM.
107
+
* Can I change the storage size after a deployment?
108
+
* Storage size can't be modified after the initial deployment. We recommend configuring the volume size by 3x to 4x of the starting size.
0 commit comments