Replica override for microservices
Modify the replica count for microservices by using template overrides for Custom Resources.
When API Connect is deployed, the deployment profile you select drives the number of replicas to
be used for most deployment. For one replica profiles, specified by
n1x....
, the replica count is 1. For three replica profiles, specified by
n3x...
, replica count is 3. Note, however, that for Cloud Pak for Integration the
API Connect Cluster profile n3xc4.m16
replica count is 1.
You can override the replica count for individual deployments by using template overrides.
- Template overrides are a piece of yaml that should be added to the Kubernetes custom resource.
The examples provided in this topic show only that the
template:
element should be under the mainspec:
element of a CR. The rest of the CR is not shown. - Specification of microservice overrides in CP4I requires prefixing the microservice name with a
designator for the subsystem type, as follows:
- Management subsystem:
mgmt-
- Gateway:
gw-
- Analytics:
a7s-
For example, for the
apim
Management microservice, useapim
when defining the override for OpenShift (or Kubernetes), but usemgmt-apim
for a CP4I override. - Management subsystem:
Management subsystem
For a Management CR in Kubernetes or OpenShift, the following override specifies 5 replicas for
the apim
deployment:
spec:
template:
- name: apim
replicaCount: 5
juhu
ldap
lur
The same override for CP4I:
spec:
template:
- name: mgmt-apim
replicaCount: 5
mgmt-juhu
mgmt-ldap
mgmt-lur
Gateway subsystem
spec:
template:
- name: datapower
replicaCount: 5
The same override for CP4I:
spec:
template:
- name: gw-datapower
replicaCount: 5
Analytics subsystem
The Analytics microservices that can be scaled using template override are:
director
ingestion
mtls-gw
storage
Note that this microservice cannot be scaled below 2 replicas when using a three replica deployment profile.
a7s-directory
a7s-ingestion
a7s-mtls-gw
a7s-storage
Note that this microservice cannot be scaled below 2 replicas when using a three replica deployment profile.