- Create KMS CMK
- Using ARN: arn:aws:kms:us-east-1:437443400885:key/819a0470-5371-4217-942e-86abd5e3c979
- Create IAM user in with admin access
- Install kube-aws
- Clone kubedemo and cd into it
- git clone https://github.com/klsetzer/kubedemo.git
- cd kubedemo
- Configure environment and create helpers
- source env_kube.sh
- cluster_name frodo
- Create Kubernetes cluster
- ./kube-creator
- Check cluster status (How long does this take to stabilize?)
- kubectl cluster-info
- May take a few minutes for cluster to finish configuring
- Start kube proxy
- kubectl start proxy &
- Launch dashboard
- kubectl create -f kubernetes/cluster/addons/dashboard
- Connect to proxy URL
- URL: http://localhost:8001/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard
- Start guestbook/all-in-one
- kubectl create -f kubernetes/examples/guestbook/all-in-one/guestbook-all-in-one.yaml
- kubectl describe service frontend
- How long does it take this to become available? (~5m?)
- cd $KUBEDEMO_HOME/<cluster_name>
- kube-aws destroy
- kill kubectl proxy process
- Create in multiple AZs
- Integrate with VPC
- Integrate with datadog
- Create CFN template for VPC, subnets, and route tables
- Need jenkins for this
- Get web based services
- HA
- Loadbalacner
- Autoscaling
- Understand Cloud-Config
- Understand discovery service
- For new clusters
- Spot pricing
- https://gist.github.com/danieldreier/e5685e77f9727bf93b18
- http://jake.ai/coreos-and-spot-instances-just-for-funzies/
- Cheaper demo
- Launching without using the bootstrap discover service
- Running fleetctl from dev workstation instead of logging into cluster https://coreos.com/fleet/docs/latest/using-the-client.html#remote-fleet-access
- Installed CoreOS cluster from CFN launch button on coreos website
- uninstalled boot2docker
- installed OS X Docker Toolbox: https://docs.docker.com/engine/installation/mac/
- Ran docker "hello world" test: $ docker run hello-world
- Installed fleetctl: $ brew install fleetctl
- Experimented with fleet: https://coreos.com/fleet/docs/latest/launching-containers-fleet.html
- Found this error: ip-10-16-183-155 bin # fleetctl list-machines Error retrieving list of active machines: googleapi: Error 503: fleet server unable to communicate with etcd
- Tried starting etcd: ip-10-16-183-155 bin # /bin/etcd [etcd] May 30 17:09:08.487 WARNING | Using the directory ip-10-16-183-155.ec2.internal.etcd as the etcd curation directory because a directory was not specified. [etcd] May 30 17:09:08.487 CRITICAL | Unable to create path: mkdir ip-10-16-183-155.ec2.internal.etcd: read-only file system
- Tried restarting with customized CFN template. Got new error: The specified instance type can only be used in a VPC. A subnet ID or network interface ID is required to carry out the request. Launching EC2 instance failed. This was because t2.* instance types can only be used in a VPC. Modified CFN template to include SubnetIds. Create VPC and subnets through web console. Got error: Launching a new EC2 instance. Status Reason: The parameter groupName cannot be used with the parameter subnet. Launching EC2 instance failed.
- Fixed CFN networking issues by changing CFN template to GroupIds instead of GroupNames.
- Now 'etcdctl cluster-health' and 'fleetctl list-machines' show a healthy cluster'
- Specifically had to add a default (Internet) route to the subnets in the coreos-demo-vpc
- Had to add a call to get a new discovery service endpoint for each new stack
- Figured out how to run fleetctl from local workstation
- Submitted unit hello.service with 'fleetctl submit units/hello.service'
- Checked with fleetctl list-unit-files
- Started hello.service: fleetctl start hello.service
- Experimenting with services: https://coreos.com/fleet/docs/latest/using-the-client.html
- Worked through https://coreos.com/kubernetes/docs/latest/kubernetes-on-aws.html
- got gpg keys
- downloaded kube-aws and installed in /usr/local
- Created an KMS key 1. aws kms --region= create-key --description="kube-aws assets"
- Download kubectl from curl -O https://storage.googleapis.com/kubernetes-release/release/v1.2.4/bin/darwin/amd64/kubectl
- kubectl --kubeconfig=kubeconfig get nodes
- The certificate management is complex. PKI integration will be interesting.
- Service load balancing seems too simple: "Services are automatically configured to load balance traffic to pods matching the label query. A random algorithm is used and is currently the only option. Session affinity can be configured to send traffic to pods by client IP." (https://coreos.com/kubernetes/docs/latest/services.html)
- Start dashboard: kubectl create -f cluster/addons/dashboard 1. run 'kubectl proxy' in a term window 1. Go to 'http://localhost:8001/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard' in a browser
- Fire up guestbook demo 1. Works with kubectl: kubectl create -f examples/guestbook/all-in-one/guestbook-all-in-one.yaml 1. Delete with kubectl delete -f examples/guestbook/all-in-one/guestbook-all-in-one.yaml 1. kubectl get svc
- Tried deploying through the dashboard 1. Failed with Node didn't have enough resource: CPU, requested: 100, used: 960
- Run 'Docker Quickstart Terminal' after installing Docker Toolbox
- eval $(ssh-agent)
- ssh-add ~/.ssh/lc-us-east-1.pem
- ssh -A core@ec2-dns-name
FLEETCTL_TUNNEL=54.175.226.58:22 fleetctl list-units
Kubernetes User Guide: http://kubernetes.io/docs/user-guide/ Calico: http://docs.projectcalico.org/en/latest/index.html#