https://pulumi.com logo
#general
Title
# general
h

handsome-actor-1155

06/18/2019, 6:15 PM
Hello, I have a question regarding deployments of pods to to k8s via Pulumi. I have a deployment that builds a docker image, uploads to ECR, and then deploys a replica set to k8s. When I update the docker image, I would expect a redeploy of the replica set in k8s but I do not see that happening.
Copy code
Updating (dev):

     Type                             Name                                       Status      Info
     pulumi:pulumi:Stack              stream-demo-sensor-reading-aggregator-dev              
 >   ├─ pulumi:pulumi:StackReference  brianbrifri/stream-demo-services/dev       read        
 >   ├─ pulumi:pulumi:StackReference  brianbrifri/stream-demo-infra/dev          read        
     ├─ docker:image:Image            sensorReadingAggregator                                
 ~   └─ kubernetes:apps:ReplicaSet    stream-demo-sensor-reading-aggregator      updated     [diff: ~spec]
Is my output but the replica set in k8s is unchanged. Is this expected behavior?
c

cool-egg-852

06/18/2019, 6:25 PM
I don’t think you can update a ReplicaSet can you? From what it looks like, you are updating it rather than creating a new one.
v1/deployment is probably what you want to be doing rather than ReplicaSet directly.
h

handsome-actor-1155

06/18/2019, 6:28 PM
Ah so a deployment would update with the latest image, not ReplicaSet?
c

cool-egg-852

06/18/2019, 6:28 PM
A Deployment is a higher level resource. It creates a new ReplicaSet that it manages, and switches from the old one to the new one once the new one is running.
h

handsome-actor-1155

06/18/2019, 6:29 PM
Ah gotcha