https://pulumi.com logo
#kubernetes
Title
# kubernetes
q

quaint-library-15224

08/13/2020, 7:49 PM
Hi I am running aws eks using pulumi and deployed an helm chart to the cluster. This setup is running in production for the past few months. Today i ran
pulumi refresh
and update the stack but now every time i try to run
pulumi up
i see that according to preview pulumi is about to delete all helm chart resources. How can i understand the reason for this ? i definitely don't wont to delete those resources from the cluster
g

gorgeous-egg-16927

08/14/2020, 8:06 PM
Can you provide the detailed diff? It should tell you why it’s planning to replace the resources.
q

quaint-library-15224

08/17/2020, 9:48 AM
This is
pulumi up
detailed diff
Copy code
- kubernetes:core/v1:Secret: (delete)
            [id=default/concourse-worker]
            [urn=urn:pulumi:dev::ops-eks::kubernetes:<http://helm.sh/v2:Chart$kubernetes:core/v1:Secret::concourse-worker|helm.sh/v2:Chart$kubernetes:core/v1:Secret::concourse-worker>]
            [provider=urn:pulumi:dev::ops-eks::pulumi:providers:kubernetes::eks-k8s-concourse::1ffb5c64-a8a5-4c38-97e3-d76c8f82076a]
        - kubernetes:core/v1:Secret: (delete)
            [id=default/concourse-web]
            [urn=urn:pulumi:dev::ops-eks::kubernetes:<http://helm.sh/v2:Chart$kubernetes:core/v1:Secret::concourse-web|helm.sh/v2:Chart$kubernetes:core/v1:Secret::concourse-web>]
            [provider=urn:pulumi:dev::ops-eks::pulumi:providers:kubernetes::eks-k8s-concourse::1ffb5c64-a8a5-4c38-97e3-d76c8f82076a]
        - kubernetes:core/v1:Service: (delete)
            [id=default/concourse-worker]
            [urn=urn:pulumi:dev::ops-eks::kubernetes:<http://helm.sh/v2:Chart$kubernetes:core/v1:Service::concourse-worker|helm.sh/v2:Chart$kubernetes:core/v1:Service::concourse-worker>]
            [provider=urn:pulumi:dev::ops-eks::pulumi:providers:kubernetes::eks-k8s-concourse::1ffb5c64-a8a5-4c38-97e3-d76c8f82076a]
        - kubernetes:<http://networking.k8s.io/v1beta1:Ingress|networking.k8s.io/v1beta1:Ingress>: (delete)
            [id=default/concourse-web]
            [urn=urn:pulumi:dev::ops-eks::kubernetes:<http://helm.sh/v2:Chart$kubernetes:networking.k8s.io/v1beta1:Ingress::concourse-web|helm.sh/v2:Chart$kubernetes:networking.k8s.io/v1beta1:Ingress::concourse-web>]
            [provider=urn:pulumi:dev::ops-eks::pulumi:providers:kubernetes::eks-k8s-concourse::1ffb5c64-a8a5-4c38-97e3-d76c8f82076a]
        - kubernetes:core/v1:Service: (delete)
            [id=default/concourse-web]
            [urn=urn:pulumi:dev::ops-eks::kubernetes:<http://helm.sh/v2:Chart$kubernetes:core/v1:Service::concourse-web|helm.sh/v2:Chart$kubernetes:core/v1:Service::concourse-web>]
            [provider=urn:pulumi:dev::ops-eks::pulumi:providers:kubernetes::eks-k8s-concourse::1ffb5c64-a8a5-4c38-97e3-d76c8f82076a]
        - kubernetes:policy/v1beta1:PodDisruptionBudget: (delete)
            [id=default/concourse-worker]
            [urn=urn:pulumi:dev::ops-eks::kubernetes:<http://helm.sh/v2:Chart$kubernetes:policy/v1beta1:PodDisruptionBudget::concourse-worker|helm.sh/v2:Chart$kubernetes:policy/v1beta1:PodDisruptionBudget::concourse-worker>]
            [provider=urn:pulumi:dev::ops-eks::pulumi:providers:kubernetes::eks-k8s-concourse::1ffb5c64-a8a5-4c38-97e3-d76c8f82076a]
        - kubernetes:core/v1:Service: (delete)
            [id=default/concourse-web-worker-gateway]
            [urn=urn:pulumi:dev::ops-eks::kubernetes:<http://helm.sh/v2:Chart$kubernetes:core/v1:Service::concourse-web-worker-gateway|helm.sh/v2:Chart$kubernetes:core/v1:Service::concourse-web-worker-gateway>]
            [provider=urn:pulumi:dev::ops-eks::pulumi:providers:kubernetes::eks-k8s-concourse::1ffb5c64-a8a5-4c38-97e3-d76c8f82076a]
        - kubernetes:core/v1:ConfigMap: (delete)
            [id=default/concourse-web]
            [urn=urn:pulumi:dev::ops-eks::kubernetes:<http://helm.sh/v2:Chart$kubernetes:core/v1:ConfigMap::concourse-web|helm.sh/v2:Chart$kubernetes:core/v1:ConfigMap::concourse-web>]
            [provider=urn:pulumi:dev::ops-eks::pulumi:providers:kubernetes::eks-k8s-concourse::1ffb5c64-a8a5-4c38-97e3-d76c8f82076a]
        - kubernetes:core/v1:ConfigMap: (delete)
            [id=default/concourse-worker]
            [urn=urn:pulumi:dev::ops-eks::kubernetes:<http://helm.sh/v2:Chart$kubernetes:core/v1:ConfigMap::concourse-worker|helm.sh/v2:Chart$kubernetes:core/v1:ConfigMap::concourse-worker>]
            [provider=urn:pulumi:dev::ops-eks::pulumi:providers:kubernetes::eks-k8s-concourse::1ffb5c64-a8a5-4c38-97e3-d76c8f82076a]
        - kubernetes:core/v1:Namespace: (delete)
            [id=concourse-main]
            [urn=urn:pulumi:dev::ops-eks::kubernetes:<http://helm.sh/v2:Chart$kubernetes:core/v1:Namespace::concourse-main|helm.sh/v2:Chart$kubernetes:core/v1:Namespace::concourse-main>]
            [provider=urn:pulumi:dev::ops-eks::pulumi:providers:kubernetes::eks-k8s-concourse::1ffb5c64-a8a5-4c38-97e3-d76c8f82076a]
        - kubernetes:apps/v1:StatefulSet: (delete)
            [id=default/concourse-worker]
            [urn=urn:pulumi:dev::ops-eks::kubernetes:<http://helm.sh/v2:Chart$kubernetes:apps/v1:StatefulSet::concourse-worker|helm.sh/v2:Chart$kubernetes:apps/v1:StatefulSet::concourse-worker>]
            [provider=urn:pulumi:dev::ops-eks::pulumi:providers:kubernetes::eks-k8s-concourse::1ffb5c64-a8a5-4c38-97e3-d76c8f82076a]
        - kubernetes:apps/v1:Deployment: (delete)
            [id=default/concourse-web]
            [urn=urn:pulumi:dev::ops-eks::kubernetes:<http://helm.sh/v2:Chart$kubernetes:apps/v1:Deployment::concourse-web|helm.sh/v2:Chart$kubernetes:apps/v1:Deployment::concourse-web>]
            [provider=urn:pulumi:dev::ops-eks::pulumi:providers:kubernetes::eks-k8s-concourse::1ffb5c64-a8a5-4c38-97e3-d76c8f82076a]
this what was updated during
pulumi refresh
Copy code
ops-eks-dev-alb-deployments (kubernetes:apps:Deployment)
~  kubernetes:apps/v1:Deployment (update)
    [id=kube-system/alb-ingress-controller]
    [urn=urn:pulumi:dev::ops-eks::kubernetes:apps/v1:Deployment::ops-eks-dev-alb-deployments]
    metadata           : {
        resourceVersion  : "179266" => "21857876"
    }
    status             : {
        conditions        : [
            [0]: {
                lastTransitionTime: "2020-04-21T08:45:20Z" => "2020-04-21T08:45:17Z"
                lastUpdateTime    : "2020-04-21T08:45:20Z" => "2020-04-21T12:56:48Z"
                message           : "Deployment has minimum availability." => "ReplicaSet "alb-ingress-controller-5d7959cdb7" has successfully progressed."
                reason            : "MinimumReplicasAvailable" => "NewReplicaSetAvailable"
                type              : "Available" => "Progressing"
            }
            [1]: {
                lastTransitionTime: "2020-04-21T08:45:17Z" => "2020-08-12T08:49:29Z"
                lastUpdateTime    : "2020-04-21T12:56:48Z" => "2020-08-12T08:49:29Z"
                message           : "ReplicaSet "alb-ingress-controller-5d7959cdb7" has successfully progressed." => "Deployment has minimum availability."
                reason            : "NewReplicaSetAvailable" => "MinimumReplicasAvailable"
                type              : "Progressing" => "Available"
            }
        ]
    }
Diagnostics:
Deployment initialization complete
 
search-ops-eks-gp2 (eks:index:Cluster$kubernetes:<http://storage.k8s.io/v1:StorageClass|storage.k8s.io/v1:StorageClass>)
~  kubernetes:<http://storage.k8s.io/v1:StorageClass|storage.k8s.io/v1:StorageClass> (update)
    [id=search-ops-eks-gp2-uubwxld2]
    [urn=urn:pulumi:dev::ops-eks::eks:index:Cluster$kubernetes:<http://storage.k8s.io/v1:StorageClass::search-ops-eks-gp2|storage.k8s.io/v1:StorageClass::search-ops-eks-gp2>]
    metadata           : {
        annotations      : {
            <http://storageclass.kubernetes.io/is-default-class|storageclass.kubernetes.io/is-default-class>     : "true" => "false"
        }
        resourceVersion  : "675" => "12218743"
    }
 
concourse-worker (kubernetes:<http://helm.sh/v2:Chart$kubernetes:policy/v1beta1:PodDisruptionBudget|helm.sh/v2:Chart$kubernetes:policy/v1beta1:PodDisruptionBudget>)
~  kubernetes:policy/v1beta1:PodDisruptionBudget (update)
    [id=default/concourse-worker]
    [urn=urn:pulumi:dev::ops-eks::kubernetes:<http://helm.sh/v2:Chart$kubernetes:policy/v1beta1:PodDisruptionBudget::concourse-worker|helm.sh/v2:Chart$kubernetes:policy/v1beta1:PodDisruptionBudget::concourse-worker>]
    metadata           : {
        resourceVersion  : "11966025" => "12130700"
    }
    status             : {
        currentHealthy    : 1 => 2
        disruptionsAllowed: 0 => 1
    }
g

gorgeous-egg-16927

08/17/2020, 3:25 PM
I don’t see anything obviously wrong in the diffs you provided. A couple possibilities I can think of would be changes to the
Copy code
eks-k8s-concourse
Provider you’re using, or something in the program changed. Does it show that the resources will be replaced, or simply deleted?
q

quaint-library-15224

08/17/2020, 4:02 PM
just be deleted without any more data
before the
pulumi refresh
command all was working
is there a way to revert
pulumi refresh
command ?
g

gorgeous-egg-16927

08/17/2020, 5:58 PM
You can revert to the checkpoint state before the refresh using
pulumi stack export --version=<previous-version-number> > stack
and then
pulumi stack import --file stack
You can also download any checkpoint state from the Pulumi console if you’re using the SaaS and then import it with the same import command
q

quaint-library-15224

08/17/2020, 6:08 PM
Ok nice i will try that 🙏
4 Views