diff --git a/cmd/kops/create_cluster.go b/cmd/kops/create_cluster.go index 3c7f48e7c3..393807a962 100644 --- a/cmd/kops/create_cluster.go +++ b/cmd/kops/create_cluster.go @@ -56,6 +56,7 @@ type CreateClusterOptions struct { MasterSize string MasterCount int32 NodeCount int32 + EncryptVolume bool Project string KubernetesVersion string OutDir string @@ -166,6 +167,7 @@ func NewCmdCreateCluster(f *util.Factory, out io.Writer) *cobra.Command { cmd.Flags().Int32Var(&options.MasterCount, "master-count", options.MasterCount, "Set the number of masters. Defaults to one master per master-zone") cmd.Flags().Int32Var(&options.NodeCount, "node-count", options.NodeCount, "Set the number of nodes") + cmd.Flags().BoolVar(&options.EncryptVolume, "encrypt-volume", options.EncryptVolume, "Generate key in aws kms and use it for encrypt etcd volumes") cmd.Flags().StringVar(&options.Image, "image", options.Image, "Image to use") @@ -436,6 +438,7 @@ func RunCreateCluster(f *util.Factory, out io.Writer, c *CreateClusterOptions) e for i, ig := range masters { m := &api.EtcdMemberSpec{} + m.EncryptedVolume = &c.EncryptVolume m.Name = names[i] m.InstanceGroup = fi.String(ig.ObjectMeta.Name)