Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Configure AWS cloud provider in Kubernetes when deployed to AWS #346
Comments
eric-sonchaiwanich
commented
Jul 11, 2017
|
So I think this involves (per https://kubernetes.io/docs/getting-started-guides/scratch/#cloud-providers):
Should be straightforward to do this via conjure-up since the cloud is known, and the path to the config file could be collected in a configuration step. On the charm side, we could add config options for cloud-provider and cloud-config. @eric-sonchaiwanich Do you happen to have an example of a cloud-config file for AWS? I'm having trouble finding an example. @stokachu @marcoceppi and everyone else, any gotchas to this that I'm not thinking of? |
|
This isn't actually straightforward. You need to have IAM profiles in place, those profiles attached to the right security groups, instances launched a certain way, and some other admin features. Most |
|
That being said, it's totally worthwhile doing this, but it's not cut and dry. |
|
@marcoceppi Good info, thanks. It looks like Sam's post documents all the steps necessary to get some minimal aws integration going. Kind of messy, but at least we can hide that inside the conjure-up spell(s). |
|
Yes, conjure is a good start, though until it does day 2 (scaling) adding a
unit of k8s worker won't have the right profile data
…
|
eric-sonchaiwanich
commented
Jul 12, 2017
|
I don't have an example but recommend looking into how kops configures the
cloud provider. I attempted to look myself bu didn't see a configuration
file passed as an arg to api-server or any other kubernetes process.
What timeframe does this look like this could be addressed?
…
|
|
There isn't any configuration other than the parameters being set and the requisite steps being executed on the cloud provider side. Work is underway to allow passing extra command line arguments to the charms in a declarative fashion, at the same time a spell for conjure-up would have to be updated to do all the pre-install scripts. There's a reason CDK works against bare metal, vmware, google, azure, rackspace, aws, etc and kops only supports aws. These deep integrations come at a high cost compared to running a stock/vanilla k8s. I will try to get a POC of a conjure up spell by the end of this week for review. |
|
@eric-sonchaiwanich Can't commit to a timeframe just yet. We'll start looking at this in our next development sprint, which starts July 24. |
tvansteenburgh
added this to the 2017.08.04 milestone
Jul 12, 2017
eric-sonchaiwanich
commented
Jul 17, 2017
|
@tvansteenburgh @marcoceppi In summary:
This generally follows the method documented here: Here are the IAM policies used (these could probably be more restrictive)
Configure cloud provider on master and workers.
Create EBS Storage Class provider
Create a test claim to validate:
Here's how I provisioned the kubernetes cluster (using bundle versions found in the latest stable canonical-kubernetes on jujucharms.com):
|
|
@eric-sonchaiwanich This is fantastic, thanks! We'll start looking at this next Monday. Most of the work will happen in conjure-up. I'll link the relevant issues here once we've created them. cc @stokachu @johnsca |
|
@tvansteenburgh can you go ahead and assign this to me? |
marcoceppi
assigned
battlemidget
Jul 20, 2017
tvansteenburgh
referenced this issue
in conjure-up/conjure-up
Jul 25, 2017
Closed
cloud native support #895
|
@eric-sonchaiwanich Feel free to test this feature out by running conjure-up from our edge channel:
|
|
@eric-sonchaiwanich For clarification, when using that edge conjure-up snap to deploy canonical-kubernetes, you should see a third step at the end of the deployment that indicates whether the native integration with AWS is enabled. Of course, the credentials given to conjure-up must have the proper permissions to perform all of the IAM and EC2 operations. The code in the conjure-up spell is based on Sam's blog post, and can be viewed here. It was tested with the hello-world app and ELB mentioned at the end of the blog, but it should also work for EBS. |
eric-sonchaiwanich
commented
Aug 3, 2017
|
Great, I will check this out, likely over the next week
…
|
|
Thanks @eric-sonchaiwanich |
|
@pseralat Did you delete your comment? Did you resolve the tagging issue? This function should remove the duplicate tag, so if there's an issue with that we'd appreciate your help debugging it. Could you perhaps provide the |
|
Any reason why these aren't on the upstream docs?
…
|
|
@marcoceppi No reason, I'll make a card for it. |
eric-sonchaiwanich commentedJul 11, 2017
Request an option, or default behavior, where an AWS cloud provider is configured in Kubernetes when deployed via conjure up. This is a prerequisite for other desirable features available in upstream kubernetes on AWS - enabling dynamic storage provisioning with EBS backed volumes, as well as dynamic ELB provisioning and Route53 integration.