Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
270fae4d
Commit
270fae4d
authored
Feb 04, 2016
by
Justin Santa Barbara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kube-up: Support multiple additional IPs for SSL cert
And pass the public IP when setting up AWS
parent
fd5c44c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
util.sh
cluster/aws/util.sh
+1
-1
common.sh
cluster/common.sh
+7
-5
No files found.
cluster/aws/util.sh
View file @
270fae4d
...
@@ -958,7 +958,7 @@ function start-master() {
...
@@ -958,7 +958,7 @@ function start-master() {
# We have to make sure that the cert is valid for API_SERVERS
# We have to make sure that the cert is valid for API_SERVERS
# i.e. we likely have to pass ELB name / elastic IP in future
# i.e. we likely have to pass ELB name / elastic IP in future
create-certs
"
${
MASTER_INTERNAL_IP
}
"
create-certs
"
${
KUBE_MASTER_IP
}
"
"
${
MASTER_INTERNAL_IP
}
"
# This key is no longer needed, and this enables us to get under the 16KB size limit
# This key is no longer needed, and this enables us to get under the 16KB size limit
KUBECFG_CERT_BASE64
=
""
KUBECFG_CERT_BASE64
=
""
...
...
cluster/common.sh
View file @
270fae4d
...
@@ -660,16 +660,18 @@ function sha1sum-file() {
...
@@ -660,16 +660,18 @@ function sha1sum-file() {
# KUBECFG_CERT_BASE64
# KUBECFG_CERT_BASE64
# KUBECFG_KEY_BASE64
# KUBECFG_KEY_BASE64
function
create-certs
{
function
create-certs
{
local
-r
cert_ip
=
"
${
1
}
"
local
-r
primary_cn
=
"
${
1
}
"
# Determine extra certificate names for master
# Determine extra certificate names for master
local
octets
=(
$(
echo
"
${
SERVICE_CLUSTER_IP_RANGE
}
"
|
sed
-e
's|/.*||'
-e
's/\./ /g'
)
)
local
octets
=(
$(
echo
"
${
SERVICE_CLUSTER_IP_RANGE
}
"
|
sed
-e
's|/.*||'
-e
's/\./ /g'
)
)
((
octets[3]+
=
1
))
((
octets[3]+
=
1
))
local
-r
service_ip
=
$(
echo
"
${
octets
[*]
}
"
|
sed
's/ /./g'
)
local
-r
service_ip
=
$(
echo
"
${
octets
[*]
}
"
|
sed
's/ /./g'
)
local
sans
=
""
local
sans
=
""
if
[[
-n
"
${
cert_ip
}
"
]]
;
then
for
extra
in
$@
;
do
sans
=
"IP:
${
cert_ip
}
,"
if
[[
-n
"
${
extra
}
"
]]
;
then
fi
sans
=
"
${
sans
}
IP:
${
extra
}
,"
fi
done
sans
=
"
${
sans
}
IP:
${
service_ip
}
,DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc,DNS:kubernetes.default.svc.
${
DNS_DOMAIN
}
,DNS:
${
MASTER_NAME
}
"
sans
=
"
${
sans
}
IP:
${
service_ip
}
,DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc,DNS:kubernetes.default.svc.
${
DNS_DOMAIN
}
,DNS:
${
MASTER_NAME
}
"
echo
"Generating certs for alternate-names:
${
sans
}
"
echo
"Generating certs for alternate-names:
${
sans
}
"
...
@@ -682,7 +684,7 @@ function create-certs {
...
@@ -682,7 +684,7 @@ function create-certs {
tar
xzf easy-rsa.tar.gz
tar
xzf easy-rsa.tar.gz
cd
easy-rsa-master/easyrsa3
cd
easy-rsa-master/easyrsa3
./easyrsa init-pki
./easyrsa init-pki
./easyrsa
--batch
"--req-cn=
${
cert_ip
}
@
$(
date
+%s
)
"
build-ca nopass
./easyrsa
--batch
"--req-cn=
${
primary_cn
}
@
$(
date
+%s
)
"
build-ca nopass
./easyrsa
--subject-alt-name
=
"
${
sans
}
"
build-server-full
"
${
MASTER_NAME
}
"
nopass
./easyrsa
--subject-alt-name
=
"
${
sans
}
"
build-server-full
"
${
MASTER_NAME
}
"
nopass
./easyrsa build-client-full kubelet nopass
./easyrsa build-client-full kubelet nopass
./easyrsa build-client-full kubecfg nopass
)
&>
${
cert_create_debug_output
}
||
{
./easyrsa build-client-full kubecfg nopass
)
&>
${
cert_create_debug_output
}
||
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment