forked from kubernetes/cloud-provider
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kubernetes#8 from RA489/readdoc
Create README.md
- Loading branch information
Showing
1 changed file
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
# cloud-provider-aws | ||
The AWS cloud provider provides the interface between a Kubernetes cluster and AWS service APIs. This project allows a Kubernetes cluster to provision, monitor and remove resources necessary for operation of the cluster. | ||
|
||
## Flags | ||
The flag `--cloud-provider=external` needs to be passed to kubelet, kube-apiserver, and kube-controller-manager. You should not pass the --cloud-provider flag to `aws-cloud-controller-manager`. | ||
|
||
## IAM Policy | ||
For the aws-cloud-controller-manager to be able to communicate to AWS APIs, you will need to create a few IAM policies for your EC2 instances. The master policy is a bit open and can be scaled back depending on the use case. Adjust these based on your needs. | ||
|
||
1. Master Policy | ||
|
||
``` | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"autoscaling:DescribeAutoScalingGroups", | ||
"autoscaling:DescribeLaunchConfigurations", | ||
"autoscaling:DescribeTags", | ||
"ec2:DescribeInstances", | ||
"ec2:DescribeRegions", | ||
"ec2:DescribeRouteTables", | ||
"ec2:DescribeSecurityGroups", | ||
"ec2:DescribeSubnets", | ||
"ec2:DescribeVolumes", | ||
"ec2:CreateSecurityGroup", | ||
"ec2:CreateTags", | ||
"ec2:CreateVolume", | ||
"ec2:ModifyInstanceAttribute", | ||
"ec2:ModifyVolume", | ||
"ec2:AttachVolume", | ||
"ec2:AuthorizeSecurityGroupIngress", | ||
"ec2:CreateRoute", | ||
"ec2:DeleteRoute", | ||
"ec2:DeleteSecurityGroup", | ||
"ec2:DeleteVolume", | ||
"ec2:DetachVolume", | ||
"ec2:RevokeSecurityGroupIngress", | ||
"ec2:DescribeVpcs", | ||
"elasticloadbalancing:AddTags", | ||
"elasticloadbalancing:AttachLoadBalancerToSubnets", | ||
"elasticloadbalancing:ApplySecurityGroupsToLoadBalancer", | ||
"elasticloadbalancing:CreateLoadBalancer", | ||
"elasticloadbalancing:CreateLoadBalancerPolicy", | ||
"elasticloadbalancing:CreateLoadBalancerListeners", | ||
"elasticloadbalancing:ConfigureHealthCheck", | ||
"elasticloadbalancing:DeleteLoadBalancer", | ||
"elasticloadbalancing:DeleteLoadBalancerListeners", | ||
"elasticloadbalancing:DescribeLoadBalancers", | ||
"elasticloadbalancing:DescribeLoadBalancerAttributes", | ||
"elasticloadbalancing:DetachLoadBalancerFromSubnets", | ||
"elasticloadbalancing:DeregisterInstancesFromLoadBalancer", | ||
"elasticloadbalancing:ModifyLoadBalancerAttributes", | ||
"elasticloadbalancing:RegisterInstancesWithLoadBalancer", | ||
"elasticloadbalancing:SetLoadBalancerPoliciesForBackendServer", | ||
"elasticloadbalancing:AddTags", | ||
"elasticloadbalancing:CreateListener", | ||
"elasticloadbalancing:CreateTargetGroup", | ||
"elasticloadbalancing:DeleteListener", | ||
"elasticloadbalancing:DeleteTargetGroup", | ||
"elasticloadbalancing:DescribeListeners", | ||
"elasticloadbalancing:DescribeLoadBalancerPolicies", | ||
"elasticloadbalancing:DescribeTargetGroups", | ||
"elasticloadbalancing:DescribeTargetHealth", | ||
"elasticloadbalancing:ModifyListener", | ||
"elasticloadbalancing:ModifyTargetGroup", | ||
"elasticloadbalancing:RegisterTargets", | ||
"elasticloadbalancing:SetLoadBalancerPoliciesOfListener", | ||
"iam:CreateServiceLinkedRole", | ||
"kms:DescribeKey" | ||
], | ||
"Resource": [ | ||
"*" | ||
] | ||
}, | ||
] | ||
} | ||
``` | ||
2. Node Policy | ||
|
||
``` | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"ec2:DescribeInstances", | ||
"ec2:DescribeRegions", | ||
"ecr:GetAuthorizationToken", | ||
"ecr:BatchCheckLayerAvailability", | ||
"ecr:GetDownloadUrlForLayer", | ||
"ecr:GetRepositoryPolicy", | ||
"ecr:DescribeRepositories", | ||
"ecr:ListImages", | ||
"ecr:BatchGetImage" | ||
], | ||
"Resource": "*" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Proper Node Names | ||
The cloud provider currently uses the instance private DNS name as the node name, but this is subject to change in the future. | ||
|
||
### NOTE | ||
Currently the implementation of the cloud provider is found in https://github.com/kubernetes/kubernetes/tree/master/pkg/cloudprovider/providers/aws, and vendored into this repository. In the future, the implementation will be migrated here and out of Kubernetes core. |