Troubleshooting
Problem
If you need to temporarily scale up or down the pods running. For example if you are unsure which APIM-v2 pod is handling the publish, config change, etc you may need to have only a single apim-v2 instance.
This would force the activity to be handled by just this pod and allow simpler debugging rather than have the actions spread over three possible nodes.
Resolving The Problem
You can do this via the following kube control commands and can be done from any node within the environment.
kubectl get pods -n namespace -o wide |
If we want to have more than one APIM pod or if we need to scale a three APIM pod down to 1 for debugging purposes we can then:
User@apic2018418:/$ kubectl -n dev get hpa NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE re314d70920-a7s-proxy Deployment/re314d70920-a7s-proxy re314d70920-apim Deployment/re314d70920-apim-v2 re314d70920-juhu Deployment/re314d70920-juhu re314d70920-ldap Deployment/re314d70920-ldap re314d70920-lur Deployment/re314d70920-lur-v2 re314d70920-ui Deployment/re314d70920-ui rfff5043330-analytics-client Deployment/rfff5043330-analytics-client rfff5043330-analytics-ingestion Deployment/rfff5043330-analytics-ingestion |
*Note that in the table you will see the "MINPODS" which states the minimum number of pods configure to run. We may need to have a single pod running for debugging purposes (ie to funnel requests to a single pod).
1. Edit the pod configuration to have 1 instance only:
kubectl -n dev edit hpa re314d70920-apim |
(make sure you are aware of VI editor commands)
2. Change the settings:
From this:
maxReplicas: 3 minReplicas: 1 |
To this:
maxReplicas: 1 minReplicas: 1 |
This change in dynamic and should be reflected in the
get pods
output after changing.Document Location
Worldwide
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSMNED","label":"IBM API Connect"},"Component":"","Platform":[{"code":"PF016","label":"Linux"}],"Version":"2018.4.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]
Was this topic helpful?
Document Information
Modified date:
28 May 2020
UID
ibm11172524