Skip to content

Commit

Permalink
Initial commit for kubernetes#428
Browse files Browse the repository at this point in the history
- Publishing documentation to grow with the PR
- Defining command line flags
  • Loading branch information
krisnova committed Oct 22, 2016
1 parent f9b11b3 commit d74dfb6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cmd/kops/create_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ type CreateClusterOptions struct {
AssociatePublicIP bool

// Channel is the location of the api.Channel to use for our defaults
Channel string
Channel string

//Subnet configuration
MastersPrivateSubnet bool
NodesPrivateSubnet bool
}

func NewCmdCreateCluster(f *util.Factory, out io.Writer) *cobra.Command {
Expand Down Expand Up @@ -111,6 +115,11 @@ func NewCmdCreateCluster(f *util.Factory, out io.Writer) *cobra.Command {

cmd.Flags().StringVar(&options.Channel, "channel", api.DefaultChannel, "Channel for default versions and configuration to use")


cmd.Flags().BoolVar(&options.MastersPrivateSubnet, "masters-private-subnet", false, "Flag to control the masters' subnet visabilty. Default 'false' to use a public subnet")
cmd.Flags().BoolVar(&options.NodesPrivateSubnet, "nodes-private-subnet", false, "Flag to control the nodes' subnet visabilty. Default 'false' to use a public subnet")


return cmd
}

Expand Down
24 changes: 24 additions & 0 deletions docs/private-networking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Private Networking in AWS

AWS offers a few different VPC subnet modes. Below are examples of different subnets that kops supports.

Kops will default to **public** subnets. In order to override this behavior use the following flags to change subnet type for instance groups.

##### Subnet modes

### All Private

All masters and minions running in a private subnet in a VPC

```
kops create cluster ... --masters-private-subnet --nodes-private-subnet
```

### Private Masters, Public Nodes

All masters running in a private subnet with all nodes in a public subnet in a VPC

```
kops create cluster ... --masters-private-subnet
```

0 comments on commit d74dfb6

Please sign in to comment.