Skip to content

Commit

Permalink
Merge pull request #7533 from justinsb/cherrypick_7435_release-1.14
Browse files Browse the repository at this point in the history
Cherry pick of #7435 onto release-1.14
  • Loading branch information
k8s-ci-robot authored Sep 8, 2019
2 parents 44a889b + aafefd7 commit b69fe4f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 5 additions & 6 deletions docs/tutorial/digitalocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ export S3_ENDPOINT=nyc3.digitaloceanspaces.com # this can also be ams3.digitaloc
export S3_ACCESS_KEY_ID=<access-key-id> # where <access-key-id> is the Spaces API Access Key for your bucket
export S3_SECRET_ACCESS_KEY=<secret-key> # where <secret-key> is the Spaces API Secret Key for your bucket

# this is required since DigitalOcean support is currently in alpha so it is feature gated, also need Override flag to use legacy etcd.
# we will eventually support etcdmanager, but until then, we need to specify this flag.
export KOPS_FEATURE_FLAGS="AlphaAllowDO,+SpecOverrideFlag"
# this is required since DigitalOcean support is currently in alpha so it is feature gated
export KOPS_FEATURE_FLAGS="AlphaAllowDO"
```

## Creating a Cluster
Expand All @@ -36,15 +35,15 @@ Note that you kops will only be able to successfully provision clusters in regio

```bash
# coreos (the default) + flannel overlay cluster in tor1
kops create cluster --cloud=digitalocean --name=my-cluster.example.com --networking=flannel --zones=tor1 --ssh-public-key=~/.ssh/id_rsa.pub --override cluster.spec.etcdClusters[*].provider=Legacy
kops create cluster --cloud=digitalocean --name=my-cluster.example.com --networking=flannel --zones=tor1 --ssh-public-key=~/.ssh/id_rsa.pub
kops update cluster my-cluster.example.com --yes

# ubuntu + weave overlay cluster in nyc1 using larger droplets
kops create cluster --cloud=digitalocean --name=my-cluster.example.com --image=ubuntu-16-04-x64 --networking=weave --zones=nyc1 --ssh-public-key=~/.ssh/id_rsa.pub --node-size=s-8vcpu-32gb --override cluster.spec.etcdClusters[*].provider=Legacy
kops create cluster --cloud=digitalocean --name=my-cluster.example.com --image=ubuntu-16-04-x64 --networking=weave --zones=nyc1 --ssh-public-key=~/.ssh/id_rsa.pub --node-size=s-8vcpu-32gb
kops update cluster my-cluster.example.com --yes

# debian + flannel overlay cluster in ams3 using optimized droplets
kops create cluster --cloud=digitalocean --name=my-cluster.example.com --image=debian-9-x64 --networking=flannel --zones=ams3 --ssh-public-key=~/.ssh/id_rsa.pub --node-size=c-4 --override cluster.spec.etcdClusters[*].provider=Legacy
kops create cluster --cloud=digitalocean --name=my-cluster.example.com --image=debian-9-x64 --networking=flannel --zones=ams3 --ssh-public-key=~/.ssh/id_rsa.pub --node-size=c-4
kops update cluster my-cluster.example.com --yes

# to delete a cluster
Expand Down
5 changes: 4 additions & 1 deletion pkg/model/components/etcdmanager/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ func (b *EtcdManagerBuilder) buildPod(etcdCluster *kops.EtcdClusterSpec) (*v1.Po
config.VolumeProvider = "do"

config.VolumeTag = []string{
fmt.Sprintf("kubernetes.io/cluster/%s=owned", b.Cluster.Name),
fmt.Sprintf("kubernetes.io/cluster=%s", b.Cluster.Name),
do.TagNameEtcdClusterPrefix + etcdCluster.Name,
do.TagNameRolePrefix + "master=1",
}
Expand Down Expand Up @@ -478,6 +478,9 @@ func (b *EtcdManagerBuilder) buildPod(etcdCluster *kops.EtcdClusterSpec) (*v1.Po
container.Env = appendEnvVariableIfExist("OS_AUTH_URL", container.Env)
container.Env = appendEnvVariableIfExist("OS_REGION_NAME", container.Env)

// Digital Ocean related values.
container.Env = appendEnvVariableIfExist("DIGITALOCEAN_ACCESS_TOKEN", container.Env)

{
foundPKI := false
for i := range pod.Spec.Volumes {
Expand Down

0 comments on commit b69fe4f

Please sign in to comment.