-
Notifications
You must be signed in to change notification settings - Fork 0
Kubernetes on AWS
GunSik Choi edited this page Feb 29, 2016
·
7 revisions
Install
- Go to Oregon region in AWS
- Configure IAM
- Go to IAM > Users > Permissions > Attach Policy: IAMFullAccess
- Go to IAM > Roles > Create New Role > "kubernetes" > Attach Policy: AmazonEC2FullAccess
- launch ec2 instance with Amazon Linux AMI and role option: "kubernetes"
- configure aws cli
$ aws configure
AWS Access Key ID [None]: accesskey
AWS Secret Access Key [None]: secretkey
Default region name [None]: us-west-2
Default output format [None]:- install k8s
export KUBERNETES_PROVIDER=aws; curl -sS https://get.k8s.io | bash- start/stop k8s
kubernetes/cluster/kube-up.sh
kubernetes/cluster/kube-down.sh- overriding options
export KUBE_AWS_ZONE=eu-west-1c // us-west-2
export NUM_MINIONS=2 // 4
export MINION_SIZE=m3.medium // t2.micro
export AWS_S3_REGION=eu-west-1 // us-west-2
export AWS_S3_BUCKET=kubernetes-artifacts // kubernetes-staging-<hashkey>
export INSTANCE_PREFIX=k8s // kubernetes- set path
export PATH=<path>/kubernetes/platforms/linux/amd64:$PATH
export PATH=<path>/kubernetes/cluster:$PATH- check cluster & credential info.
kubect cluster-info
kubectl config view-
ssh to k8s master
- k8s key files exists in ~/.ssh/kube_aws_ras
-
test
kubectl get pods --namespace=kube-systemReference