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
2950e81c
Unverified
Commit
2950e81c
authored
Apr 26, 2019
by
Darren Shepherd
Committed by
GitHub
Apr 26, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #371 from warmchang/nf_conntrack
馃敡
modprobe nf_conntrack
parents
9db91d7d
22bd3a3c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
README.md
README.md
+1
-3
k3s.service
k3s.service
+2
-2
setup.go
pkg/agent/syssetup/setup.go
+15
-1
No files found.
README.md
View file @
2950e81c
...
...
@@ -80,7 +80,7 @@ flag
At this point, you can run the agent as a separate process or not run it on this node at all.
If you encounter an error like
`"stream server error: listen tcp: lookup some-host on X.X.X.X:53: no such host"`
when starting k3s please ensure
`/etc/hosts`
contains your current hostname (output of
`hostname`
),
when starting k3s please ensure
`/etc/hosts`
contains your current hostname (output of
`hostname`
),
set to a 127.x.x.x address. For example:
```
127.0.1.1 myhost
...
...
@@ -267,8 +267,6 @@ After=network.target
[Service]
Type
=
notify
EnvironmentFile
=
/etc/systemd/system/k3s.service.env
ExecStartPre
=
-/sbin/modprobe br_netfilter
ExecStartPre
=
-/sbin/modprobe overlay
ExecStart
=
/usr/local/bin/k3s server
KillMode
=
process
Delegate
=
yes
...
...
k3s.service
View file @
2950e81c
...
...
@@ -4,8 +4,8 @@ Documentation=https://k3s.io
After=network.target
[Service]
ExecStartPre=-/sbin/modprobe br_netfilter
E
xecStartPre=-/sbin/modprobe overlay
Type=notify
E
nvironmentFile=/etc/systemd/system/k3s.service.env
ExecStart=/usr/local/bin/k3s server
KillMode=process
Delegate=yes
...
...
pkg/agent/syssetup/setup.go
View file @
2950e81c
...
...
@@ -13,12 +13,26 @@ var (
)
func
Configure
()
error
{
exec
.
Command
(
"modprobe"
,
"br_netfilter"
)
.
Run
()
if
err
:=
exec
.
Command
(
"modprobe"
,
"br_netfilter"
)
.
Run
();
err
!=
nil
{
logrus
.
Warnf
(
"failed to start br_netfilter module"
)
return
nil
}
if
err
:=
ioutil
.
WriteFile
(
callIPTablesFile
,
[]
byte
(
"1"
),
0640
);
err
!=
nil
{
logrus
.
Warnf
(
"failed to write value 1 at %s: %v"
,
callIPTablesFile
,
err
)
return
nil
}
if
err
:=
ioutil
.
WriteFile
(
forward
,
[]
byte
(
"1"
),
0640
);
err
!=
nil
{
logrus
.
Warnf
(
"failed to write value 1 at %s: %v"
,
forward
,
err
)
return
nil
}
if
err
:=
exec
.
Command
(
"modprobe"
,
"overlay"
)
.
Run
();
err
!=
nil
{
logrus
.
Warnf
(
"failed to start overlay module"
)
return
nil
}
if
err
:=
exec
.
Command
(
"modprobe"
,
"nf_conntrack"
)
.
Run
();
err
!=
nil
{
logrus
.
Warnf
(
"failed to start nf_conntrack module"
)
return
nil
}
return
nil
}
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