You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 30, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: Documentation/kubernetes-on-aws-render.md
+18-4Lines changed: 18 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -251,14 +251,28 @@ useCalico: true
251
251
252
252
`kube-aws`can optionally create an ALIAS record for the controller's ELB in an existing Route53 hosted zone.
253
253
254
-
Edit the `cluster.yaml` file:
254
+
Just run `kube-aws init` with the flag `--hosted-zone-id` to specify the id of the hosted zone in which the record is created.
255
+
256
+
If you've run `kube-aws init` without the flag, edit the `cluster.yaml` file to add `loadBalancer.hostedZone.id` under the first item of `apiEndpoints`:
255
257
256
258
```yaml
257
-
externalDNSName: kubernetes.staging.example.com
258
-
createRecordSet: true
259
-
hostedZoneId: A12B3CDE4FG5HI
259
+
apiEndpoints:
260
+
- name: default
261
+
dNSName: kubernetes.staging.example.com
262
+
loadBalancer:
263
+
hostedZone:
264
+
id: A12B3CDE4FG5HI
265
+
260
266
# DEPRECATED: use hostedZoneId instead
261
267
#hostedZone: staging.example.com
268
+
269
+
# DEPRECATED: use loadBalancer.hostedZone.id instead
270
+
#hostedZoneId: A12B3CDE4FG5HI
271
+
272
+
# DEPRECATED: use loadBalancer.createRecordSet instead
273
+
# This is even implied to be true when loadBalancer.hostedZone.id is specified
274
+
#createRecordSet: true
275
+
262
276
```
263
277
264
278
If `createRecordSet` is not set to true, the deployer will be responsible for making externalDNSName routable to the the ELB managing the controller nodes after the cluster is created.
Copy file name to clipboardExpand all lines: cmd/init.go
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ func init() {
24
24
RootCmd.AddCommand(cmdInit)
25
25
cmdInit.Flags().StringVar(&initOpts.ClusterName, "cluster-name", "", "The name of this cluster. This will be the name of the cloudformation stack")
26
26
cmdInit.Flags().StringVar(&initOpts.ExternalDNSName, "external-dns-name", "", "The hostname that will route to the api server")
27
+
cmdInit.Flags().StringVar(&initOpts.HostedZoneID, "hosted-zone-id", "", "The hosted zone in which a Route53 record set for a k8s API endpoint is created")
27
28
cmdInit.Flags().StringVar(&initOpts.Region.Name, "region", "", "The AWS region to deploy to")
28
29
cmdInit.Flags().StringVar(&initOpts.AvailabilityZone, "availability-zone", "", "The AWS availability-zone to deploy to")
29
30
cmdInit.Flags().StringVar(&initOpts.KeyName, "key-name", "", "The AWS key-pair for ssh access to nodes")
# Kubernetes API endpoints with each one has a DNS name and is with/without a managed/unmanaged ELB, Route 53 record set
49
42
# CAUTION: `externalDNSName` must be omitted when there are one or more items under `apiEndpoints`
50
-
#apiEndpoints:
51
-
# # The unique name of this API endpoint used to identify it inside CloudFormation stacks or
52
-
# # to be referenced from other parts of cluster.yaml
53
-
#- name: template
54
-
#
55
-
# # DNS name for this endpoint, added to the kube-apiserver TLS cert
56
-
# dnsName: dns-name.tld
57
-
#
58
-
# loadBalancer:
59
-
# # Specifies an existing load-balancer used for load-balancing controller nodes and serving this endpoint
60
-
# # Setting id requires all the other settings excluding `name` to be omitted because reusing an ELB implies that configuring other resources
61
-
# # like a Route 53 record set for the endpoint is now your responsibility!
62
-
# # Also, don't forget to add controller.securityGroupIds to include a glue SG to allow your existing ELB to access controller nodes created by kube-aws
63
-
# id: existing-elb
64
-
#
65
-
# # Set to false when you want to disable creation of the record set for this api load balancer
66
-
# # Must be omitted when `id` is specified
67
-
# createRecordSet: true
68
-
#
69
-
# # All the subnets assigned to this load-balancer. Specified only when this load balancer is not reused but managed one
70
-
# # Must be omitted when `id` is specified
71
-
# subnets:
72
-
# - name: managedPublic1
73
-
#
74
-
# # Set to true so that the managed ELB becomes an `internal` one rather than `internet-facing` one
75
-
# # When set to true while subnets are omitted, one or more private subnets in the top-level `subnets` must exist
76
-
# # Must be omitted when `id` is specified
77
-
# private: true
78
-
#
79
-
# # TTL in seconds for the Route53 RecordSet created if createRecordSet is set to true.
80
-
# recordSetTTL: 300
81
-
#
82
-
# # The Route 53 hosted zone is where the resulting Alias record is created for this endpoint
83
-
# # Must be omitted when `id` is specified
84
-
# hostedZone:
85
-
# id: hostedzone-abc
86
-
#
43
+
apiEndpoints:
44
+
- # The unique name of this API endpoint used to identify it inside CloudFormation stacks or
45
+
# to be referenced from other parts of cluster.yaml
46
+
name: default
47
+
48
+
# DNS name for this endpoint, added to the kube-apiserver TLS cert
49
+
# It must be somehow routable to the Kubernetes controller nodes
50
+
# from worker nodes and external clients. Configure the options
51
+
# below if you'd like kube-aws to create a Route53 record sets/hosted zones
52
+
# for you. Otherwise the deployer is responsible for making this name routable
53
+
dnsName: {{.ExternalDNSName}}
54
+
55
+
# Configuration for an ELB serving this endpoint
56
+
# Omit all the settings when you want kube-aws not to provision an ELB for you
57
+
loadBalancer:
58
+
# Specifies an existing load-balancer used for load-balancing controller nodes and serving this endpoint
59
+
# Setting id requires all the other settings excluding `name` to be omitted because reusing an ELB implies that configuring other resources
60
+
# like a Route 53 record set for the endpoint is now your responsibility!
61
+
# Also, don't forget to add controller.securityGroupIds to include a glue SG to allow your existing ELB to access controller nodes created by kube-aws
62
+
#id: existing-elb
63
+
64
+
# Set to true when you want kube-aws to create a Route53 ALIAS record set for this API load balancer for you
65
+
# Must be omitted when `id` is specified
66
+
{{if .HostedZoneID -}}
67
+
createRecordSet: true
68
+
{{else -}}
69
+
createRecordSet: false
70
+
{{- end}}
71
+
# All the subnets assigned to this load-balancer. Specified only when this load balancer is not reused but managed one
72
+
# Must be omitted when `id` is specified
73
+
#subnets:
74
+
#- name: managedPublic1
75
+
76
+
# Set to true so that the managed ELB becomes an `internal` one rather than `internet-facing` one
77
+
# When set to true while subnets are omitted, one or more private subnets in the top-level `subnets` must exist
78
+
# Must be omitted when `id` is specified
79
+
#private: false
80
+
81
+
# TTL in seconds for the Route53 RecordSet created if createRecordSet is set to true.
82
+
#recordSetTTL: 300
83
+
84
+
# The Route 53 hosted zone is where the resulting Alias record is created for this endpoint
85
+
# Must be omitted when `id` is specified
86
+
{{if .HostedZoneID -}}
87
+
hostedZone:
88
+
# The ID of hosted zone to add the dnsName to.
89
+
id: {{.HostedZoneID}}
90
+
{{else -}}
91
+
#hostedZone:
92
+
# # The ID of hosted zone to add the dnsName to.
93
+
# id: ""
94
+
{{- end}}
87
95
# # Network ranges of sources you'd like Kubernetes API accesses to be allowed from, in CIDR notation. Defaults to ["0.0.0.0/0"] which allows any sources.
88
96
# # Explicitly set to an empty array to completely disable it.
89
97
# # If you do that, probably you would like to set securityGroupIds to provide this load balancer an existing SG with a Kubernetes API access allowed from specific ranges.
0 commit comments