-
Notifications
You must be signed in to change notification settings - Fork 463
Use kubectl instead of curl to load kube-system manifests #462
Conversation
@daveey Great PR! I had also needed to depend on a 3rd party image in my PR #465 What I have done there was to make image/command passed to With that, I believe that there will be small chances we can get our PRs merged as is, because we won't break things in fragile/backward-incompatible ways. If that is not enough, I guess we can contribute a Dockerfile for @colhom @aaronlevy Excuse me for being obtrusive but would you mind looking into this? We like to contribute but the same issue seems to be blocking us. |
@@ -90,21 +90,17 @@ write_files: | |||
owner: root:root | |||
content: | | |||
#!/bin/bash -e | |||
/usr/bin/curl -H "Content-Type: application/json" -XPOST -d @"/srv/kubernetes/manifests/kube-system.json" "http://127.0.0.1:8080/api/v1/namespaces" | |||
docker run -v /etc/kubernetes:/etc/kubernetes \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably prefer this was run via rkt
Couple things to cover here:
Once the flag bug is resolved, I wouldn't necessarily be opposed to running kubectl via a container (although I'd likely prefer that it was run via |
@aaronlevy thanks for the review, I should have posted a link to the issue. Take a look at the discussion there which addresses the "apply" issue, as well as why curl is problematic. I agree with the preference for the original hyperkube image, however the flag bug has been open for a while and not addressed so I don't know when we can expect it. |
Commented on the linked issue. Would you be interested in taking a stab at fixing the upstream issue? On a quick scan it looks like it would mean improving flag parsing here: https://github.com/kubernetes/kubernetes/blob/master/cmd/hyperkube/hyperkube.go#L117 |
@aaronlevy i won't have time to work on the upstream issue for a while |
@daveey I'll be looking into the upstream hyperkube issue soon to see if we can get this resolved. |
@daveey update on things. kubernetes/kubernetes#25512 is merged, fixing the hyperkube flag issue. we're going to wait until v1.3 (with that PR in it) is released before going forward with this PR. |
@daveey would this be something you're still interested in tackling? kubectl is now part of hyperkube, so we could now do something like |
I'm going to close this due to inactivity - but please re-open if this is something you would like to see merged. |
curl can silently fail, leaving the kube system only partially set up
ideally we would use the quay.io/coreos/hyperkube:v1.2.2_coreos.0 image and run /hyperkube kubectl, however this doesn't work due to
kubernetes/kubernetes#24088
this PR uses a 3rd party image for kubectl, which means it shouldn't be merged.
i am hoping someone can help me add kubectl to the hyperkube image directly, or suggest other alternatives