Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kubernetes- Helm upgrade not working

I am trying to upgrade one of my chart. But the changes which I have made in the "deployment.yaml" template in the chart is not there after the upgrade. I added the following lines in the spec of my kubernetes deployment.yaml file

spec:
  containers:
  - env:
    - name: LOGBACK_DB_ACQUIRE_INCREMENT
      value: "1"
    - name: LOGBACK_DB_MAX_IDLE_TIME_EXCESS_CONNECTIONS
      value: "10"
    - name: LOGBACK_DB_MAX_POOL_SIZE
      value: "2"
    - name: LOGBACK_DB_MIN_POOL_SIZE
      value: "1"

I tried upgrading using the following command

helm upgrade ironic-molly spring-app-0.1.2.tgz --recreate-pods

Where "ironic-molly" is the release-name and spring-app-0.1.2.tgz is my chart with changes.

Helm output says that the package is upgraded, but the changes which i have made is missing in the deployment.yaml. What might be causing this issue.?

Regards,

Muhammed Roshan

like image 563
Muhammed Roshan Avatar asked Jan 31 '26 21:01

Muhammed Roshan


1 Answers

(If the problem is not with indents - adding an answer that also matches the title in general).


A few points to consider when you upgrade your helm charts:

1 ) Add the --debug to the helm upgrade command.

2 ) Check the current values of the specific resource - for example deployment:
kubectl get deploy <deploymnet name> -o yaml.

3 ) Check latest events: kubectl get events -n <namespace>.

4 ) Check latest logs: kubectl logs -l name=myLabel.

5 ) If you want to ensure that pods are re-created - add a specific timestamp via annotation:

kind: Deployment
metadata:
...
spec:
  template:
    metadata:
      labels:
        app: k8s-dashboard
      annotations:
        timestamp: "{{ date "20060102150405" .Release.Time }}"
like image 190
RtmY Avatar answered Feb 02 '26 14:02

RtmY



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!