kops version are you running? The command kops version, will display$ kops version
Version 1.8.1
kubectl version will print thekops flag.Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.3", GitCommit:"d2835416544f298c919e2ead3be3d0864b52323b", GitTreeState:"clean", BuildDate:"2018-02-09T21:51:06Z", GoVersion:"go1.9.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.6", GitCommit:"6260bb08c46c31eea6cb538b34a9ceb3e406689c", GitTreeState:"clean", BuildDate:"2017-12-21T06:23:29Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
What cloud provider are you using?
AWS
What commands did you run? What is the simplest way to reproduce this issue?
I tried passing in additional user data to a instance group by following this doc
This is how my ig manifest looks like
apiVersion: kops/v1alpha2
kind: InstanceGroup
metadata:
creationTimestamp: 2018-01-30T19:38:43Z
labels:
kops.k8s.io/cluster: test.mycluster.xyz.com
name: master-us-east-1b
spec:
additionalUserData:
- name: myscript.sh
type: text/x-shellscript
content: |
#!/bin/sh
echo "Hello World. The time is now $(date -R)!" | tee /root/output.txt
image: 595879546273/CoreOS-stable-1576.5.0-hvm
machineType: t2.medium
maxSize: 1
minSize: 1
nodeLabels:
kops.k8s.io/instancegroup: master-us-east-1b
role: Master
subnets:
- us-east-1b
When I'm passing debain image instance comes back fine. So, I think the problem is with coreos image not with kops.
/cc @KashifSaadat @gambol99
Adding some folks that know CoreOS
I don't believe this is supported for CoreOS I'm afraid: https://github.com/coreos/bugs/issues/912
You should be able to get around this by use of FileAssets & Hooks.
Since the release of CoreOS 1367.5.0, cloudinit was migrated to ignition. additionalUserData should be in Container Linux Config transplier yaml format which in turn, gets consumed by ignition during loading of initramfs.
You can see it in the output log which states "systemd: failed start Ignition".
Take a look at https://github.com/coreos/container-linux-config-transpiler/blob/master/doc/configuration.md for details.
Unfortunately, additionalUserData is completely unusable with CoreOS, because ignition and/or coreos-cloudinit do not support the multipart mime user data format, which is the format that Kops ends up using when additionalUserData is specified.
kops hooks are the correct workaround - assuming you can get them to work, given how limited they are. (You're going to append ".service" to the end of my .swap unit file? Really?)
kops hooks and file assets seem like a poor fit for managing /usr/share/oem/grub.cfg, or more generally finding a good way to set audit=1 on the kernel command line, or other kernel command line parameters. Is something else intended?
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
@fejta-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity.
Reopen the issue with/reopen.
Mark the issue as fresh with/remove-lifecycle rotten.Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Did anyone figure out what to do with this? Or is the solution for now the fileAssets and hooks?
/reopen
@eedgar: You can't reopen an issue/PR unless you authored it or you are a collaborator.
In response to this:
/reopen
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
I am having this issue. I want to set the ntp time and install ssm on the bastion where hooks don't work either.
Is there a way to set a raw type that doesn't do the mime wrapping on coreos?
/reopen
@mikesplain: Reopening this issue.
In response to this:
/reopen
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
I have the same issue when installing ssm on the coreos instances with additionalUserData. Some nodes, for instance, two masters, have started successfully, but most of them were restarting themselves constantly.
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
@fejta-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity.
Reopen the issue with/reopen.
Mark the issue as fresh with/remove-lifecycle rotten.Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/reopen
@max-lobur: You can't reopen an issue/PR unless you authored it or you are a collaborator.
In response to this:
/reopen
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Got the same issue while tried to hack iptables for kiam