To run anything with kubernetes we need to define a configuration for our cluster first. Easy way is to use minikube. We won't use that. There are at least 3 executables you would use: kubelet - an application that runs on every node allowing remote interaction kubeadm kubectl - with it you can control the cluster (on local or remote machines), ex. on your computer which might be NOT a part of cluster... in our case it would connect to local host So go to https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/ then execute # systemctl restart kubelet # we are trying to restart kubelet... I already had this working # journalctl -xe # wait... something is not right let's check the logs # swapoff -a # it was refusing to run on my system as I had swap enabled thus I'm disabling the swap # service kubelet status #checking kubelet status... and it is still not starting... in fact restarting all the time # service kubelet stop # no need t...
I'm back to the kubernetes initialization. When trying to run `kubeadm init` I'm getting a warning about cgroupfs which should be replaced with systemd. I'm using ubuntu with systemd. https://kubernetes.io/docs/setup/cri The documentation states that having systemd OS and cgroupfs for k8s leads to having 2 cgroup managers and could lead to conflicts . As a result I'm switching to systemd. My previous problem with swap is gone as my system has now 72 GB of RAM and no swap at all (by my design). But I'm on a new system. I have created a new file /etc/docker/daemon.json and set driver there to systemd. Followed by `service docker restart`. `kubeadm init`... I have some more warnings: ethtool, socat, conntrack and kubelet service are missing. `apt install -y ethtool socat conntrack` - lucky this is already available on my system and I can install whatever came with it (no need for newest-possible-predevelop sources). Now only kubelet service is missing... ` sudo vim /et...
Your application probably consists of microservices. Each would be running in its own virtual machine (or physical machine... it doesn't really matter). Suc a virtual machine is our "container" . A container could be rarely a physical machine. Usually it would be a virtual machine on aws, azure, google cloud or our own server. Container is created using some virtualization technology. Some examples are virtualbox, hyperv, vmware, kvm2, docker. My choice is to use docker . For k8s container is a pod . Like a pod of whales (group of whales). But creation of the container might fail - thus one pod could have more than one container under it. Summary: A pod is one (or more) machine (likely virtual) called "container".
Comments
Post a Comment