The information contained in this article has been verified as up-to-date on the date of the original publication of the article. HashiCorp endeavors to keep this information up-to-date and correct, but it makes no representations or warranties of any kind, express or implied, about the ongoing completeness, accuracy, reliability, or suitability of the information provided.
All information contained in this article is for general information purposes only. Any reliance you place on such information as it applies to your use of your HashiCorp product is therefore strictly at your own risk.
Introduction
This is a guide to increase resources to Terminating Gateway init container. Currently, the resource values are not exposed to helm chart configuration. We can edit the deployment manually as a quick workaround.
Expected Outcome
Increasing the default resource values will allow the container to load and process properly.
Prerequisites
- k8s administrative privileges to Consul namespace.
Use Case
In the event that the terminating gateway pod gets into a CrashLoopBack state or stuck at the Init state, it may be due to the terminating-gateway-init
running into OOMkilled
with the following log:
2023-03-17T14:35:59.194Z [INFO] Consul login complete 2023-03-17T14:35:59.194Z [INFO] Checking that the ACL token exists when reading it in the stale consistency mode 2023-03-17T14:35:59.196Z [ERROR] Unable to read ACL token; retrying: err="Unexpected response code: 403 (ACL not found)" 2023-03-17T14:35:59.297Z [INFO] Successfully read ACL token from the server 2023-03-17T14:35:59.297Z [INFO] Successfully read ACL token from the server Killed
Procedure
1) Get the name of the terminating-gateway deployment
kubectl -n consul get deployment
2) Edit the consul-consul-terminating-gateway deployment
kubectl -n consul edit deployment consul-consul-terminating-gateway
3) As a starting point, you may change the limits on the CPU 100m and Memory 100Mi. (Increments of 50 would be acceptable).
...
name: terminating-gateway-init
resources:
limits:
cpu: 100m
memory: 100Mi
...
4) Save and confirm the changes have been applied and the Terminating Gateway pod(s) are in a running state.
References
- Kubernetes: kubectl edit