Skip to content

Instantly share code, notes, and snippets.

@bakins bakins/kube-proxy.json
Last active Aug 29, 2015

Embed
What would you like to do?
k8s build
#!/bin/bash
set -e
KUBERNETES_VERSION=0.19.0
RELEASE=${KUBERNETES_VERSION}-1
ETCD_VERSION=2.0.11
DOCKER_VERSION=1.6.2
WORKDIR=$(mktemp -d k8s.XXXXXXXXXX)
trap "rm -rf '${WORKDIR}'" EXIT
mkdir -p .cache
for F in kube-apiserver kube-proxy kube-scheduler kube-controller-manager kubelet; do
mkdir -p ${WORKDIR}/${F}/rootfs
pushd ${WORKDIR}/${F}/rootfs
mkdir usr
ln -s sbin usr/sbin
ln -s bin usr/bin
ln -s usr/lib64 lib64
ln -s lib64 lib
popd
sed s/{{RELEASE}}/${RELEASE}/ $F.json > ${WORKDIR}/${F}/manifest
if [ ! -f .cache/${F} ]; then
curl -f -o .cache/${F} -L https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES_VERSION}/bin/linux/amd64/${F}
fi
cp .cache/${F} ${WORKDIR}/${F}/rootfs/${F}
chmod +x ${WORKDIR}/${F}/rootfs/${F}
actool build --overwrite ${WORKDIR}/${F} ${F}-${RELEASE}.aci
done
{
"acKind": "ImageManifest",
"acVersion": "0.6.1",
"name": "kube-proxy",
"labels": [
{
"name": "version",
"value": "{{RELEASE}}"
},
{
"name": "os",
"value": "linux"
},
{
"name": "arch",
"value": "amd64"
}
],
"app": {
"exec": [
"/kube-proxy"
],
"user": "0",
"group": "0",
"mountPoints": [
{
"name": "usr",
"path": "/usr",
"readOnly": true
},
{
"name": "etc-ssl",
"path": "/etc/ssl",
"readOnly": true
},
{
"name": "var-lib-kubernetes",
"path": "/var/lib/kubernetes"
}
],
"isolators": [
{
"name": "os/linux/capabilities-retain-set",
"value": {
"set": [
"CAP_NET_ADMIN"
]
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.