Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubeadm system container #96

Closed
wants to merge 2 commits into from

Conversation

jasonbrooks
Copy link
Collaborator

@jasonbrooks jasonbrooks commented Jul 28, 2017

A system container for kubeadm, as blogged about at http://www.projectatomic.io/blog/2017/05/testing-system-containerized-kubeadm/, but with fedora containers.

atomic install --system --system-package=no --name kubelet docker.io/jasonbrooks/kubeadm
systemctl start kubelet
kubeadm init 

Copy link
Collaborator

@ashcrow ashcrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff, but a few updates are needed.

ENV container=docker

ENV NAME=kubeadm VERSION=0 RELEASE=0 ARCH=x86_64
LABEL BZComponent="$NAME" \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Labels should be lower case.

Architecture="$ARCH" \
atomic.type='system'

RUN dnf install -y docker iproute kubernetes-kubeadm kubernetes-node kubernetes-client containernetworking-cni ethtool ebtables && dnf clean all
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--setopt=tsflags=nodocs should be used to help keep the size down.

FROM registry.fedoraproject.org/fedora:rawhide
MAINTAINER "Jason Brooks" <jbrooks@redhat.com>

ENV container=docker
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a reference to this used in the system container itself. It may be worth putting a comment above it explaining what it's used for.

export KUBELET_KUBECONFIG_ARGS="--kubeconfig=/etc/kubernetes/kubelet.conf --require-kubeconfig=true"
export KUBELET_SYSTEM_PODS_ARGS='--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true --cgroup-driver=systemd --cgroups-per-qos=false --enforce-node-allocatable='
export KUBELET_NETWORK_ARGS="--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/usr/libexec/cni"
export KUBELET_DNS_ARGS="--cluster-dns=10.96.0.10 --cluster-domain=cluster.local"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this value be hardcoded?

@ashcrow ashcrow changed the title kubeadm system container WIP: kubeadm system container Oct 17, 2017
get env values from config file

if there's a crio drop-in, use it

add back temp_kubelet_args

place kubelet vars in an editable location, look for crio env vars if available

fix

dockerfile tweaks
@ashcrow
Copy link
Collaborator

ashcrow commented Oct 18, 2017

<snip>
Testing container kubeadm
<snip>
config.json.template: linux/selinuxProcessLabel not valid.  Use process/selinuxLabel

],
"devices": null,
"apparmorProfile": "",
"selinuxProcessLabel": ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line doesn't look valid.

]
},
{
"type": "bind",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking, is this mount used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it's strictly needed. The service part of this container is the kubelet, and I based the container on the kubelet system container. That one includes this mount.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't block on it, but if it isn't needed it would be nice to remove it later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do some tests

@ashcrow ashcrow changed the title WIP: kubeadm system container kubeadm system container Oct 18, 2017
Copy link
Collaborator

@ashcrow ashcrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much better. A few questions and one thing that needs to be fixed.

@ashcrow
Copy link
Collaborator

ashcrow commented Oct 18, 2017

@jasonbrooks

Testing file ./kubeadm/config.json.template
parse error: invalid object key (must be a string)
                                        {     "ociVersion": "1.0.0",  
                     (right here) ------^
JSON is invalid

I think it's really the extra coma:

        "devices": null,
        "apparmorProfile": "", <--------------
    }
}

@jasonbrooks
Copy link
Collaborator Author

@ashcrow I amended 7a4e0e5 to remove that comma

@ashcrow
Copy link
Collaborator

ashcrow commented Oct 18, 2017

@rh-atomic-bot r+ 7a4e0e5

@rh-atomic-bot
Copy link

⚡ Test exempted: merge already tested.

rh-atomic-bot pushed a commit that referenced this pull request Oct 18, 2017
Closes: #96
Approved by: ashcrow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants