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
06b62ef4
Commit
06b62ef4
authored
Nov 18, 2015
by
He Simei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgrade etcd flag for docker-k8s
parent
0ed6432f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
11 deletions
+20
-11
docker-multinode.md
docs/getting-started-guides/docker-multinode.md
+8
-7
master.md
docs/getting-started-guides/docker-multinode/master.md
+1
-1
master.sh
docs/getting-started-guides/docker-multinode/master.sh
+10
-2
docker.md
docs/getting-started-guides/docker.md
+1
-1
No files found.
docs/getting-started-guides/docker-multinode.md
View file @
06b62ef4
...
@@ -88,9 +88,10 @@ The first step in the process is to initialize the master node.
...
@@ -88,9 +88,10 @@ The first step in the process is to initialize the master node.
Clone the Kubernetes repo, and run
[
master.sh
](
docker-multinode/master.sh
)
on the master machine with root:
Clone the Kubernetes repo, and run
[
master.sh
](
docker-multinode/master.sh
)
on the master machine with root:
```
sh
```
console
cd
kubernetes/docs/getting-started-guides/docker-multinode/
$
export
MASTER_IP
=
<your_master_ip
(
e.g. 1.2.3.4
)>
./master.sh
$
cd
kubernetes/docs/getting-started-guides/docker-multinode/
$
./master.sh
```
```
`Master done!`
`Master done!`
...
@@ -103,10 +104,10 @@ Once your master is up and running you can add one or more workers on different
...
@@ -103,10 +104,10 @@ Once your master is up and running you can add one or more workers on different
Clone the Kubernetes repo, and run
[
worker.sh
](
docker-multinode/worker.sh
)
on the worker machine with root:
Clone the Kubernetes repo, and run
[
worker.sh
](
docker-multinode/worker.sh
)
on the worker machine with root:
```
sh
```
console
export
MASTER_IP
=
<your_master_ip
(
e.g. 1.2.3.4
)>
$
export
MASTER_IP
=
<your_master_ip
(
e.g. 1.2.3.4
)>
cd
kubernetes/docs/getting-started-guides/docker-multinode/
$
cd
kubernetes/docs/getting-started-guides/docker-multinode/
./worker.sh
$
./worker.sh
```
```
`Worker done!`
`Worker done!`
...
...
docs/getting-started-guides/docker-multinode/master.md
View file @
06b62ef4
...
@@ -70,7 +70,7 @@ across reboots and failures.
...
@@ -70,7 +70,7 @@ across reboots and failures.
Run:
Run:
```
sh
```
sh
sudo
docker
-H
unix:///var/run/docker-bootstrap.sock run
--net
=
host
-d
gcr.io/google_containers/etcd:2.2.1 /usr/local/bin/etcd
--
addr
=
127.0.0.1:4001
--bind-addr
=
0.0.0.0
:4001
--data-dir
=
/var/etcd/data
sudo
docker
-H
unix:///var/run/docker-bootstrap.sock run
--net
=
host
-d
gcr.io/google_containers/etcd:2.2.1 /usr/local/bin/etcd
--
listen-client-urls
=
http://127.0.0.1:4001,http://
${
MASTER_IP
}
:4001
--advertise-client-urls
=
http://127.0.0.1:4001,http://
${
MASTER_IP
}
:4001
--data-dir
=
/var/etcd/data
```
```
Next, you need to set a CIDR range for flannel. This CIDR should be chosen to be non-overlapping with any existing network you are using:
Next, you need to set a CIDR range for flannel. This CIDR should be chosen to be non-overlapping with any existing network you are using:
...
...
docs/getting-started-guides/docker-multinode/master.sh
View file @
06b62ef4
...
@@ -39,6 +39,14 @@ if [ "$(id -u)" != "0" ]; then
...
@@ -39,6 +39,14 @@ if [ "$(id -u)" != "0" ]; then
exit
1
exit
1
fi
fi
# Make sure master ip is properly set
if
[
-z
${
MASTER_IP
}
]
;
then
echo
"Please export MASTER_IP in your env"
exit
1
else
echo
"k8s master is set to:
${
MASTER_IP
}
"
fi
# Check if a command is valid
# Check if a command is valid
command_exists
()
{
command_exists
()
{
command
-v
"
$@
"
>
/dev/null 2>&1
command
-v
"
$@
"
>
/dev/null 2>&1
...
@@ -112,8 +120,8 @@ start_k8s(){
...
@@ -112,8 +120,8 @@ start_k8s(){
-d
\
-d
\
gcr.io/google_containers/etcd:2.2.1
\
gcr.io/google_containers/etcd:2.2.1
\
/usr/local/bin/etcd
\
/usr/local/bin/etcd
\
--
addr
=
127.0.0.1
:4001
\
--
listen-client-urls
=
http://127.0.0.1:4001,http://
${
MASTER_IP
}
:4001
\
--
bind-addr
=
0.0.0.0:4001
\
--
advertise-client-urls
=
http://127.0.0.1:4001,http://
${
MASTER_IP
}
:4001
--data-dir
=
/var/etcd/data
--data-dir
=
/var/etcd/data
sleep
5
sleep
5
...
...
docs/getting-started-guides/docker.md
View file @
06b62ef4
...
@@ -89,7 +89,7 @@ parameters as follows:
...
@@ -89,7 +89,7 @@ parameters as follows:
### Step One: Run etcd
### Step One: Run etcd
```
sh
```
sh
docker run
--net
=
host
-d
gcr.io/google_containers/etcd:2.2.1 /usr/local/bin/etcd
--
addr
=
127.0.0.1:4001
--bind-addr
=
0.0.0.0
:4001
--data-dir
=
/var/etcd/data
docker run
--net
=
host
-d
gcr.io/google_containers/etcd:2.2.1 /usr/local/bin/etcd
--
listen-client-urls
=
http://127.0.0.1:4001
--advertise-client-urls
=
http://127.0.0.1
:4001
--data-dir
=
/var/etcd/data
```
```
### Step Two: Run the master
### Step Two: Run the master
...
...
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