bump pwk to kube 1.27.2

Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
This commit is contained in:
Marcos Lilljedahl
2023-05-30 01:36:31 -03:00
parent a327b1926c
commit edd1ec41e4
8 changed files with 37 additions and 24 deletions

View File

@@ -10,7 +10,7 @@ ENV PATH $PATH:$GOPATH
ENV DOCKER_TLS_CERTDIR=""
ENV DOCKER_CLI_EXPERIMENTAL=enabled
ENV COMPOSE_VERSION=2.6.1
ENV COMPOSE_VERSION=2.16.0
# Add bash completion and set bash as default shell

View File

@@ -2,8 +2,13 @@
"experimental": true,
"debug": true,
"log-level": "info",
"insecure-registries": ["127.0.0.1"],
"hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2375"],
"insecure-registries": [
"127.0.0.1"
],
"hosts": [
"unix:///var/run/docker.sock",
"tcp://0.0.0.0:2375"
],
"tls": DOCKER_TLSENABLE,
"tlscacert": "DOCKER_TLSCACERT",
"tlscert": "DOCKER_TLSCERT",

2
dockerfiles/k8s/.bashrc Normal file
View File

@@ -0,0 +1,2 @@
export PS1="[\h \W]$ "
cat /etc/motd

View File

@@ -5,7 +5,7 @@ COPY ./kubernetes.repo /etc/yum.repos.d/
RUN yum install -y kubectl-1.20.1 kubeadm-1.20.1 kubelet-1.20.1 \
RUN yum install -y kubectl-1.27.2 kubeadm-1.27.2 kubelet-1.27.2 \
#&& mv -f /etc/systemd/system/kubelet.service.d/10-kubeadm.conf /etc/systemd/system/kubelet.service \
&& yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo \
&& yum install -y docker-ce git bash-completion \
@@ -25,11 +25,10 @@ COPY ./tokens.csv /etc/pki/tokens.csv
COPY ./daemon.json /etc/docker/
COPY ./resolv.conf.override /etc/
COPY ./docker.service /usr/lib/systemd/system/
COPY ./.bashrc /root/
COPY motd /etc/motd
RUN echo $'cat /etc/motd \n\
export PS1="[\h \W]$ "' >> /root/.bash_profile
RUN echo 'source <(kubectl completion bash)' >>~/.bashrc \
&& kubectl completion bash >> /etc/bash_completion.d/kubectl
@@ -39,5 +38,7 @@ RUN mkdir -p /root/.kube && ln -s /etc/kubernetes/admin.conf /root/.kube/config
WORKDIR /root
CMD mount --make-shared / && systemctl start docker && systemctl start kubelet \
&& while true; do bash -l; done
CMD mount --make-shared / \
&& systemctl start docker \
&& systemctl start kubelet \
&& while true; do script -q -c "/bin/bash -l" /dev/null; done

View File

@@ -1,8 +1,14 @@
{
"experimental": true,
"debug": true,
"log-level": "info",
"storage-driver": "vfs",
"insecure-registries": ["127.0.0.1"],
"hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2375"]
"experimental": true,
"debug": true,
"cri-containerd": true,
"log-level": "info",
"tls": false,
"insecure-registries": [
"127.0.0.1"
],
"hosts": [
"unix:///var/run/docker.sock",
"tcp://0.0.0.0:2375"
]
}

View File

@@ -1,7 +1,6 @@
KUBELET_KUBECONFIG_ARGS=" --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
KUBELET_SYSTEM_PODS_ARGS="--pod-manifest-path=/etc/kubernetes/manifests --pod-infra-container-image=k8s.gcr.io/pause:3.2"
KUBELET_NETWORK_ARGS="--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
KUBELET_KUBECONFIG_ARGS="--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
KUBELET_SYSTEM_PODS_ARGS="--pod-manifest-path=/etc/kubernetes/manifests"
KUBELET_DNS_ARGS="--cluster-dns=10.96.0.10 --cluster-domain=cluster.local"
KUBELET_AUTHZ_ARGS="--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt"
KUBELET_CGROUP_ARGS="--cgroup-driver=cgroupfs"
KUBELET_EXTRA_ARGS="--fail-swap-on=false --resolv-conf=/etc/resolv.conf.override"
KUBELET_EXTRA_ARGS="--fail-swap-on=false --resolv-conf=/etc/resolv.conf.override --container-runtime-endpoint /run/docker/containerd/containerd.sock "

View File

@@ -14,7 +14,7 @@
2. Initialize cluster networking:
kubectl apply -f https://raw.githubusercontent.com/cloudnativelabs/kube-router/master/daemonset/kubeadm-kuberouter.yaml
kubectl apply -f https://raw.githubusercontent.com/cloudnativelabs/kube-router/master/daemonset/kubeadm-kuberouter.yaml
3. (Optional) Create an nginx deployment:

View File

@@ -138,7 +138,7 @@ fi
if [[ "$@" == "init"* || "$@" == "join"* ]]; then
# Call kubeadm with params and skip flag
/usr/bin/kubeadm "$@" --ignore-preflight-errors all
/usr/bin/kubeadm "$@" --ignore-preflight-errors all --cri-socket /run/docker/containerd/containerd.sock
else
# Call kubeadm with params
/usr/bin/kubeadm "$@"