[轉]"migrating" to Kubernetes from docker-compose in homelab

https://www.reddit.com/r/docker/comments/9j2vc7/migrating_to_kubernetes_from_dockercompose_in/ If / when you’re able to spawn arbitrary VMs, you can look at kubeadm, CoreOS, RKE (my current choice), and so on for cluster creation. Before you can use kompose, or use kubectl apply -f myawesome.yaml, you first and foremost need to set up a Kubernetes cluster. This might be the most challenging thing to do because Kubernetes is heavy-weight compared to docker-compose. I recommend using RKE to set it up. Also, run away if anyone mentions Kubespray. ...

2019-02-20 · 1 min · 82 words · Me

YAML multi-line string

https://rancher.com/docs/rke/v0.1.x/en/config-options/add-ons/user-defined-add-ons/ To define an add-on directly in the YAML file, make sure to use the YAML’s block indicator |- as the addons directive is a multi-line string option. It’s possible to specify multiple YAML resource definitions by separating them using the -– directive.

2019-02-20 · 1 min · 43 words · Me

[轉]Benchmark results of Kubernetes network plugins (CNI) over 10Gbit/s network

https://itnext.io/benchmark-results-of-kubernetes-network-plugins-cni-over-10gbit-s-network-36475925a560

2019-02-12 · 1 min · word · Me

k8s kubernetes Lesson 3 k8s by hand

Kubernetes wiki https://wiki.gslin.org/wiki/Kubernetes How to Install a Kubernetes Docker Cluster on CentOS 7 https://www.howtoforge.com/tutorial/centos-kubernetes-docker-cluster/ https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/ https://sueboy.blogspot.com/2019/11/kubernetes-nodeport.html https://rickhw.github.io/2019/03/17/Container/Install-K8s-with-Kubeadm/ ===== https://www.howtoforge.com/tutorial/centos-kubernetes-docker-cluster/ only one master/node k8s yum update setenforce 0 sed -i --follow-symlinks 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux modprobe br_netfilter echo '1' > /proc/sys/net/bridge/bridge-nf-call-iptables swapoff -a vim /etc/fstab >> mark swap yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo yum install -y docker-ce cat << eof > /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg EOF yum install -y kubelet kubeadm kubectl sudo reboot systemctl start docker && systemctl enable docker systemctl start kubelet && systemctl enable kubelet docker info | grep -i cgroup sed -i 's/cgroup-driver=systemd/cgroup-driver=cgroupfs/g' /etc/systemd/system/kubelet.service.d/10-kubeadm.conf systemctl daemon-reload systemctl restart kubelet ## kubeadm init --apiserver-advertise-address=10.0.15.10 --pod-network-cidr=10.244.0.0/16 kubeadm init --pod-network-cidr=10.244.0.0/16 mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml kubectl get nodes kubectl get pods --all-namespaces https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#control-plane-node-isolation ...

2019-01-31 · 4 min · 676 words · Me

[轉]kubernetes failure stories

https://github.com/hjacobs/kubernetes-failure-stories

2019-01-31 · 1 min · word · Me