goglfreedom.blogg.se

Ubuntu install docker and kubernetes
Ubuntu install docker and kubernetes





ubuntu install docker and kubernetes

Now we can activate the “kubectl” command line utility by providing it with needed credentials to the master’s API. To control which network interface and IP address should be used to connect to the master node (in case you have several IPs available, including the public IP on AWS, for example) you can specify this argument to the kubeadm init command: kubeadm init -apiserver-advertise-address= In our example, we follow the best practices and use an internal range IP, you should try to avoid connecting your worker nodes to the master using its public IP address. The IP address 172.31.2.102 is your Kubernetes master node IP. The most important output of this command is the “join token” that you will use to connect worker machines to the master: kubeadm join -token d6f319.16d5b1544286b7c3 172.31.2.102:6443 Go ahead and run: kubeadm init -node-name master

  • Creates several JSON manifests in /etc/kubernetes/manifests/ folder, each describing one of the master components: etcd, kube-apiserver, kube-controller-manager, kube-scheduler, and their default settings (you can modify any of these later).
  • Generates secret keys and default users (to connect to kube-apiserver and control the cluster using the “kubectl” CLI tool).
  • Now you are ready to initialize the master server with the kubeadm init command, which does the following:

    ubuntu install docker and kubernetes

    Those packages will also install the “kubectl” tool as a dependency, which will be used to control the cluster from the command line.

    UBUNTU INSTALL DOCKER AND KUBERNETES UPDATE

    Refresh apt-get to see newly available packages, and install “kubelet” and “kubeadm”: apt-get update Add the official Kubernetes packages repository to your repo list: echo “deb kubernetes-xenial main” | tee /etc/apt//kubernetes.listĤ. Import the GPG repository key to protecting yourself against downloading Kubernetes packages that may not be genuine or sourced from potentially fake repositories: curl -s | apt-key add -ģ. On CentOS and Amazon Linux, you will simply run yum install docker and not “docker.io”.Īlso if you have not done so already, make sure Docker is enabled upon boot: systemctl enable rviceĢ. This applies to Ubuntu/Debian distributions. If you install “docker” you will get the “System tray for KDE3/GNOME2 docklet applications” instead of the Docker container runtime that we need. Please don’t confuse the installation package name of “docker.io” with “docker” in this step. Install Docker and the “apt-transport-https” helper package: apt-get update & apt-get -y install docker.io apt-transport-https The following is an example of the install process on Ubuntu:ġ.

    ubuntu install docker and kubernetes

    apt-transport-https (allows usage of HTTPS transport for repositories).kubelet (the “node agent” that will launch needed Docker containers).kubeadm (cluster administration tool that will bootstrap the master components).Docker container runtime (v1.12+ recommended).You will need to install the following packages on the “master” server that will store the state of your cluster and control each worker node: We recommend using latest Ubuntu distro, but CentOS or Amazon Linux is also fine. Instead, you can use Kublr to create a highly available, multi-master Kubernetes setup on AWS or bare-metal infrastructure (for an overview of Kubernetes architecture, check out this article).įirst, create any Linux virtual machine or cloud instance (or bare metal server) and login to the Linux shell. It’s important to note that you don’t have to run production workloads on a single master cluster. This is a step-by-step tutorial, which shows single master Kubernetes cluster installation, for development, staging, and QA environments.







    Ubuntu install docker and kubernetes