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

adamant-translator-31969

11/20/2020, 3:12 PM
Hi!! I have a question! How can I import a daemonset without specify all attributes (spec.template, spec.selector) ?
✔️ 1
When I try to import daemonset only with import:id , pulumi ask me all attributes to do import
I'm programming with TS in AWS environment
b

billowy-army-68599

11/20/2020, 8:59 PM
once you import a resource into a pulumi program, you need to flesh out the code to match the current running state
a

adamant-translator-31969

11/21/2020, 10:40 PM
@billowy-army-68599 yes, in my stage: fist I run a k8s.apps.Daemonset.get() method to get information about existing daemonSet ...after this I try to run this code
const kubeProxy = new k8s.apps.v1.DaemonSet(
'kube-proxy',
{
metadata: metadaObtained (this variable is obtained from k8s.DaemonSet.get method),
spec: specObtained (this variable is obtained from k8s.apps.DaemonSet.get method)
},
updateStrategy: spec.updateStrategy,
},
},
{
provider: providerK8s,
import: 'kube-system/kube-proxy',
}
But, Import in pulumi failed because pulumi ask me more info, for instance: in VolumeMounts, Volumes, containers. When I print data (spec, annotation) obtained from K8S.apps.daemonset.get method this output
3 Views