anchor.diff:  
   == S3 bucket to store Kubernetes config
   
  -Kops needs a “state store” to store configuration information of the cluster.  For example, how many nodes, instance type of each node, and Kubernetes version. The state is stored during the initial cluster creation. Any subsequent changes to the cluster are also persisted to this store as well. As of now, Amazon S3 is the only supported storage mechanism. Create a S3 bucket and pass that to the kops CLI during cluster creation.
  -
  -    aws s3api create-bucket --bucket kubernetes-aws-config
  +Kops needs a "`state store`" to store configuration information of the cluster.  For example, how many nodes, instance type of each node, and Kubernetes version. The state is stored during the initial cluster creation. Any subsequent changes to the cluster are also persisted to this store as well. As of now, Amazon S3 is the only supported storage mechanism. Create a S3 bucket and pass that to the kops CLI during cluster creation.
  +
  +    aws s3api create-bucket --bucket kubernetes-aws-io
       # enable versioning and export
       aws s3api put-bucket-versioning \
  -      --bucket kubernetes-aws-config \
  +      --bucket kubernetes-aws-io \
         --versioning-configuration \
         Status=Enabled
  -    export KOPS_STATE_STORE=s3://kubernetes-aws-config
  -
  -== Create hosted zone on Route53
  -
  -DNS is used by Kubernetes to allow the various Kubernetes components to find and communicate with each other.
  -
  -As an alternative to using DNS, Kops 1.6.2 introduced the ability to create a gossip-based cluster, making a top-level domain or a subdomain no longer required to create the cluster. The only requirement to trigger this is to have the cluster name end with `.k8s.local`. This is a fairly recent feature, so we recommend you continue to use DNS for production clusters. If you wish to use a gossip-based cluster, then you can skip this section.
  -
  -The domain allows the worker nodes to discover the master and the master to discover all the etcd servers. This is also needed for kubectl to be able to talk directly with the master.
  -
  -This domain may be registered with AWS, in which case a Route 53 hosted zone is created for you. Alternatively, this domain may be at a different registrar. In this case, create a Route 53 hosted zone. Specify the name server (NS) records from the created zone as NS records with the domain registrar.
  -
  -If you own a Route53 domain name, download https://github.com/stedolan/jq/wiki/Installation[jq]
  -and run this command:
  -
  -    ID=$(uuidgen) && aws route53 create-hosted-zone \
  -      --name kubernetes-aws.io \
  -      --caller-reference $ID \
  -      | jq .DelegationSet.NameServers
  -
  -See other means of creating DNS: https://github.com/kubernetes/kops/blob/master/docs/aws.md#configure-dns
  +    export KOPS_STATE_STORE=s3://kubernetes-aws-io
  +
  +== Configure DNS
  +
  +Creating a Kubernetes cluster using kops requires a top-level domain or a subdomain and setting up Route 53 hosted zones. This allows the various Kubernetes components to find and communicate with each other. This is also needed for kubectl to be able to talk directly with the master.
  +
  +Kops also has an experimental support for gossip-based cluster. This does not require a top-level domain, subdomain or a Route53 hosted zone to be registered.
  +
  +In order to create a cluster, you need to pick one of the options. These are described below.
  +
  +=== Top-level domain or subdomain-based cluster
  +
  +If you are using top-level domain or subdomain, and has any of the following scenarios:
  +
  +. Domain purchased/hosted via AWS
  +. A subdomain under a domain purchased/hosted via AWS
  +. Setting up Route53 for a domain purchased with another registrar, transfering the domain to Route53
  +. Subdomain for clusters in Route53, leaving the domain at another registrar
  +
  +Then you need to follow the instructions in https://github.com/kubernetes/kops/blob/master/docs/aws.md#configure-dns[configure DNS]. Typically, the first and the last bullet are common scenarios.
  +
  +=== Gossip-based cluster
  +
  +Kops also has an experimental support for gossip-based cluster. It uses Weave Mesh behind the scene. This makes the process of creating a Kubernetes cluster using kops DNS-free, and much more simplified. This also means a top-level domain or a subdomain is no longer required to create the cluster. The only requirement to trigger this is to have the cluster name end with `.k8s.local`. 
  +
  +This is a fairly recent feature, so we recommend you continue to use DNS for production clusters. However, setting up a gossip-based cluster allows you to get started rather quickly.
  +
  +=== Create private VPC
  +
  +TODO: where does it fit?
   
   If you don't own a DNS domain name, you can create a custom domain using Route53's private hosted zone.
  -You need to provide VPC info to run this command. See below how to <<Create VPC (Optional)>>
  +You need to provide VPC info to run this command.
  +
  +     VPCID=`aws ec2 create-vpc --cidr-block 10.1.0.0/16 --region us-east-1 --query 'Vpc.VpcId' --output text`
  +     # modify dns hostname resolution for the VPC
  +     aws ec2 modify-vpc-attribute --vpc-id $VPCID --enable-dns-hostnames "{\"Value\":true}"
  +     # create internet gateway and attach it to VPC
  +     IGW=`aws ec2 create-internet-gateway --region us-east-1 --query 'InternetGateway.InternetGatewayId' --output text`
  +     aws ec2 attach-internet-gateway --internet $IGW --vpc $VPCID --region us-east-1
  +
  +Now, create a Route53 private hosted zone using this VPC:
   
       ID=$(uuidgen) && aws route53 create-hosted-zone ]\
         --name k8s-aws.internal \
  
positive.code:       --caller-reference $ID \
        | jq .DelegationSet.NameServers
  
  == Create kubernetes cluster
  
  The Kops CLI can be used to create a highly available cluster, with multiple master nodes spread across multiple Availability Zones. Workers can be spread across multiple zones as well. Some of the tasks that happen behind the scene during cluster creation are:
  
  
negative.code: 
  == Install kops
  
  There is no need to download a Kubernetes binary distribution for creating a cluster using kops. However, you do need to download the kops CLI. It then takes care of downloading the right Kubernetes binary in the cloud, and provisions the cluster.
  
      brew update && brew install kops
  
  