This repository has been archived by the owner on Nov 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce kubernetes-node containers
This commit introduces containers for the Kubernetes node services. The node container contains the requistite package to install the node service. There is a container for each service (kubelet and kube-proxy) that contain additional packages required to run each service, as well as an atomic run label and an entrypoint for convinience (these containers are based off of the node container).
- Loading branch information
1 parent
ed91f88
commit c623082
Showing
9 changed files
with
1,113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM fedora/kubernetes-node | ||
MAINTAINER Solly Ross <[email protected]> | ||
|
||
# NOTE: kubelet wants pidof (from sysvinit-tools), but it can't use it | ||
# properly in a container, so we skip installing it | ||
|
||
# Containerized kubelet requires nsenter | ||
RUN yum install -y util-linux && yum clean all | ||
|
||
# cAdvisor wants /etc/machine-id | ||
# containerized kubelet needs /:/rootfs and /var/lib/kubelet to mount volumes | ||
LABEL RUN='/usr/bin/docker run -d --privileged --net=host ${OPT1} -v /sys:/sys:ro -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker:/var/lib/docker -v /etc/machine-id:/etc/machine-id:ro -v /var/lib/kubelet:/var/lib/kubelet -v /:/rootfs --name ${NAME} ${IMAGE} --containerized --v=0 ${OPT3}' | ||
|
||
ENTRYPOINT ["/usr/bin/kubelet"] |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
dockerfiles-fedora-kubernetes-kubelet | ||
===================================== | ||
|
||
Fedora dockerfile for kubelet. Tested with Docker 1.7.1. | ||
|
||
Get Docker version | ||
``` | ||
# docker version | ||
``` | ||
|
||
To build: | ||
|
||
Build or pull the `fedora/kubernetes-node` container. | ||
|
||
Copy the source Dockerfile down and do the build: | ||
``` | ||
# docker build --rm -t <username>/kubernetes-kubelet . | ||
``` | ||
|
||
To run (use `--opt1` to pass options to Docker, and `--opt3` to pass options to kubelet): | ||
|
||
``` | ||
# atomic run --opt1="-v /etc/kubernetes/manifests:/etc/kubernetes/manifests:ro" --opt3="--address=$MASTER_IP --config=/etc/kubernetes/manifests --hostname_override=$MASTER_IP --api_servers=http://$MASTER_IP:8080" fedora/kubernetes-kubelet | ||
``` | ||
|
||
Refer to the Kubernetes documentation for more information about applicable options. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM fedora | ||
MAINTAINER Solly Ross <[email protected]> | ||
|
||
RUN yum -y update && yum clean all | ||
RUN yum install -y kubernetes-node && yum clean all |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
dockerfiles-fedora-kubernetes-node | ||
================================== | ||
|
||
Base fedora dockerfile for the kubernetes node services. | ||
Tested with Docker 1.7.1. | ||
|
||
Get Docker version | ||
``` | ||
# docker version | ||
``` | ||
|
||
To build: | ||
|
||
Copy the source Dockerfile down and do the build: | ||
``` | ||
# docker build --rm -t <username>/kubernetes-node . | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM fedora/kubernetes-node | ||
MAINTAINER Solly Ross <[email protected]> | ||
|
||
RUN yum install -y iptables && yum clean all | ||
|
||
LABEL RUN='/usr/bin/docker run -d --net=host --privileged ${OPT1} --name ${NAME} ${IMAGE} ${OPT3}' | ||
|
||
ENTRYPOINT ["/usr/bin/kube-proxy"] |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
dockerfiles-fedora-kubernetes-proxy | ||
=================================== | ||
|
||
Fedora dockerfile for kube-proxy. Tested with Docker 1.7.1. | ||
|
||
Get Docker version | ||
``` | ||
# docker version | ||
``` | ||
|
||
To build: | ||
|
||
Build or pull the `fedora/kubernetes-node` container. | ||
|
||
Copy the source Dockerfile down and do the build: | ||
``` | ||
# docker build --rm -t <username>/kubernetes-proxy . | ||
``` | ||
|
||
To run (use `--opt1` to pass options to Docker, and `--opt3` to pass options to proxy): | ||
|
||
``` | ||
# atomic run --opt3="--master=http://$MASTER_IP:8080" fedora/kubernetes-proxy | ||
``` | ||
|
||
Refer to the Kubernetes documentation for more information about applicable options. |