Last active
August 26, 2016 14:45
-
-
Save sirhopcount/72e5ef26b143fd3027c6b87d5c760d49 to your computer and use it in GitHub Desktop.
k8s-caclico
This file contains hidden or 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
{ | |
"name": "calico-k8s-network", | |
"type": "calico", | |
"etcd_endpoints": "http://127.0.0.1:2379", | |
"log_level": "none", | |
"log_level_stderr": "info", | |
"ipam": { | |
"type": "calico-ipam" | |
} | |
} |
This file contains hidden or 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
2016-08-26 14:16:20,396 2976 [default/nginx-3137573019-uyshu] ERROR CNI Error: | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal docker[1617]: { | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal docker[1617]: "msg": "", | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal docker[1617]: "cniVersion": "0.1.0", | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal docker[1617]: "code": 100, | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal docker[1617]: "details": null | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal docker[1617]: } | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal docker[1617]: Traceback (most recent call last): | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal docker[1617]: File "<string>", line 629, in _provision_veth | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal docker[1617]: File "site-packages/pycalico/datastore_datatypes.py", line 344, in provision_veth | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal docker[1617]: File "site-packages/pycalico/netns.py", line 95, in create_veth | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal docker[1617]: File "site-packages/subprocess32.py", line 638, in check_output | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal docker[1617]: CalledProcessError: Command '['ip', 'link', 'add', 'calia921151c6b9', 'type', 'veth', 'peer', 'name', 'tmpa921151c6b9']' returned non-zero exit status 2 | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal docker[1617]: E0826 14:16:20.416865 1702 cni.go:201] Error adding network: | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal docker[1617]: E0826 14:16:20.416941 1702 cni.go:158] Error while adding to cni network: | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal docker[1617]: E0826 14:16:20.416980 1702 docker_manager.go:1978] Failed to setup network for pod "nginx-3137573019-uyshu_default(9e745913-6b97-11e6-b2df-0a8ea28c0355)" using network plugins "cni": ; Skipping pod | |
Aug 26 14:16:20 ip-10-100-6-252.eu-west-1.compute.internal systemd[1]: Stopped docker container b9b6ac3a5544ed770e39016231da4057d3ef46a8343e1249fc458834a8a4c645. |
This file contains hidden or 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
FROM alpine:latest | |
MAINTAINER [email protected] | |
ENV REFRESHED_AT 2016-08-17 | |
ENV K8S_VERSION=v1.3.5 | |
ENV CNI_VERSION=v0.3.0 | |
ENV CALICO_VERSION=v1.3.1 | |
RUN set -ex \ | |
~ && apk add --update util-linux bash curl wget ca-certificates iptables curl rsync bind-tools jq bridge-utils \ | |
&& eval export GLIBC_VERSION=$(curl -sSL https://api.github.com/repos/sgerrand/alpine-pkg-glibc/releases/latest | jq '.["tag_name"]') \ | |
&& for pkg in glibc-${GLIBC_VERSION} glibc-bin-${GLIBC_VERSION} glibc-i18n-${GLIBC_VERSION}; \ | |
¦ ¦ ¦do curl -sSL https://github.com/andyshinn/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/${pkg}.apk -o /tmp/${pkg}.apk; \ | |
¦ ¦done \ | |
&& apk add --allow-untrusted /tmp/*.apk \ | |
&& rm -v /tmp/*.apk \ | |
&& mkdir -p /opt/cni/bin /etc/cni/net.d \ | |
&& wget -q -c -N https://artifacts.redacted.nl/kubernetes/${K8S_VERSION}/hyperkube -P /usr/local/bin \ | |
&& curl -s -L https://github.com/appc/cni/releases/download/$CNI_VERSION/cni-$CNI_VERSION.tgz | tar zxv -C /opt/cni/bin \ | |
&& wget -q -c -N https://github.com/projectcalico/calico-cni/releases/download/${CALICO_VERSION}/calico -P /opt/cni/bin \ | |
&& wget -q -c -N https://github.com/projectcalico/calico-cni/releases/download/${CALICO_VERSION}/calico-ipam -P /opt/cni/bin \ | |
&& chmod +x /usr/local/bin/hyperkube \ | |
&& chmod +x /opt/cni/bin/* \ | |
&& apk --purge -v del glibc-i18n jq curl wget ca-certificates \ | |
&& rm -rf /var/cache/apk/* \ | |
&& echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf | |
# Copy the cni configuration into /opt/ | |
ADD conf/10-calico.conf /etc/cni/net.d | |
# Create symlinks for each hyperkube server | |
# TODO: replace manual symlink creation with --make-symlink command once | |
# cross-building with qemu supports go binaries. See #28702 | |
# RUN /hyperkube --make-symlinks | |
RUN ln -s /usr/local/bin/hyperkube /usr/local/bin/apiserver \ | |
&& ln -s /usr/local/bin/hyperkube /usr/local/bin/controller-manager \ | |
&& ln -s /usr/local/bin/hyperkube /usr/local/bin/federation-apiserver \ | |
&& ln -s /usr/local/bin/hyperkube /usr/local/bin/federation-controller-manager \ | |
&& ln -s /usr/local/bin/hyperkube /usr/local/bin/kubectl \ | |
&& ln -s /usr/local/bin/hyperkube /usr/local/bin/kubelet \ | |
&& ln -s /usr/local/bin/hyperkube /usr/local/bin/proxy \ | |
&& ln -s /usr/local/bin/hyperkube /usr/local/bin/scheduler |
This file contains hidden or 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
ExecStart=/usr/bin/docker run \ | |
--name k8s-kubelet \ | |
--rm \ | |
--net=host \ | |
--pid=host \ | |
--privileged \ | |
--volume=/:/rootfs:ro \ | |
--volume=/proc:/rootfs/proc:ro \ | |
--volume=/sys:/sys:ro \ | |
--volume=/dev:/dev \ | |
--volume=/var/lib/docker/:/var/lib/docker:rw \ | |
--volume=/var/run:/var/run:rw \ | |
--volume=/run:/run:rw \ | |
registry.redacted.nl/redacted/hyperkube \ | |
/usr/local/bin/kubelet \ | |
--containerized \ | |
--allow-privileged \ | |
--hostname-override=${COREOS_PRIVATE_IPV4} \ | |
--network_plugin=cni \ | |
--network-plugin-dir=/etc/cni/net.d \ | |
--api-servers=${KUBERNETES_API_ENDPOINT} \ | |
--logtostderr=true \ | |
--container-runtime=docker \ | |
--docker=unix:///var/run/docker.sock \ | |
--cluster_dns=${COREOS_PRIVATE_IPV4} \ | |
--cluster_domain=kubernetes.local \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment