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
74273879
Commit
74273879
authored
Sep 14, 2015
by
Andy Zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add trusty node health monitoring
Upstart monitors the process of docker, kubelet, and kube-proxy. This change adds an upstart job running as daemon to conduct non-PID health monitoring.
parent
f03a2670
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
node.yaml
cluster/gce/trusty/node.yaml
+40
-0
No files found.
cluster/gce/trusty/node.yaml
View file @
74273879
...
@@ -372,5 +372,45 @@ script
...
@@ -372,5 +372,45 @@ script
fi
fi
end script
end script
--===============6024533374511606659==
MIME-Version
:
1.0
Content-Type
:
text/upstart-job; charset="us-ascii"
Content-Transfer-Encoding
:
7bit
Content-Disposition
:
attachment; filename="kube-node-health-monitoring.conf"
description "Kubenetes node health monitoring"
start on stopped kube-docker and started kube-proxy
respawn
script
set -o nounset
# Wait for a minute to let docker, kubelet, and kube-proxy processes finish initialization.
# TODO(andyzheng0831): replace it with a more reliable method if possible.
sleep 60
sleep_seconds=10
max_seconds=10
# We simply kill the process when there is a failure. Another upstart job will automatically
# restart the process.
while [ 1 ]; do
if ! timeout 10 docker version > /dev/null; then
echo "Docker daemon failed!"
pkill docker
fi
if ! curl -m ${max_seconds} -f -s http://127.0.0.1:10255/healthz > /dev/null; then
echo "Kubelet is unhealthy!"
pkill kubelet
fi
if ! curl -m ${max_seconds} -f -s http://127.0.0.1:10249/healthz > /dev/null; then
echo "Kube-proxy is unhealthy!"
pkill kube-proxy
fi
sleep ${sleep_seconds}
done
end script
--===============6024533374511606659==--
--===============6024533374511606659==--
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