Guys when I create a Service type using the k8s pr...
# general
t
Guys when I create a Service type using the k8s provider I find that pulumi appends a unique ID to my service name
s
That is pretty standard Pulumi behavior, but you can set a
name:
parameter to specify a name that won't get the ID appended
c
to be clear, the reason for this is because if we need to replace the resource because you changed an immutable property (in the case of
Service
,
.spec.clusterIP
is one example), we will want to create a new service before replacing the old one.
if you don’t add the suffix you can’t do this.
even kubernetes does this under the covers for replicasets and pods when you use
Deployment
You could hard code them, but this is almost always worse than the alternatives