<p>Good morning,</p>

<p>I have a k8s cluster where multiple ingress services share a pre generated self managed certificate in GCP. </p>

<p>My problem is that when the certificate expires, I need to update the yaml file with the name of the new cert and apply the modified yaml file for each of the ingress to update the certs. We do it, updating the environment variable and redeploying the application. I was thinking in a better way to do it that will not require to redeploy it, I was planning to use kubectl patch to do this, anyone has already have to done something similar?</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    ingress.gcp.kubernetes.io/pre-shared-cert: cert-abc
    ingress.kubernetes.io/forwarding-rule: fwd-abc
    ingress.kubernetes.io/https-forwarding-rule: https-fwd-abc
    ingress.kubernetes.io/https-target-proxy: tgt-https-abc
    ingress.kubernetes.io/ssl-cert: cert-abc
    ingress.kubernetes.io/static-ip: ip-abc
    ingress.kubernetes.io/target-proxy: tgt-http-abc
    ingress.kubernetes.io/url-map: lb-abc
    kubernetes.io/ingress.global-static-ip-name: sta-ip-abc
  creationTimestamp: 2019-01-29T22:38:10Z
  generation: 2
  name: abc-ingress
  namespace: abc  
spec:
  backend:
    serviceName: abc
    servicePort: 80
</code></pre>

<p>Thanks in advance for your help.</p>

Eduardo Ruela
<p>We have similar challenges. <code>kubectl apply</code> works fine here as <a href="https://stackoverflow.com/users/5225183/hernan-garcia">Hernan Garcia</a> already pointed out.</p>

<p>A patch can do the same trick.</p>

<p>Our choice in fact way using <a href="https://helm.sh/" rel="nofollow noreferrer">helm</a> which is quite easy to use and which makes it quite easy to update selectively values. Furthermore you have the option to rollback if something goes wrong, which is nice for automated deployments.</p>
