|
|
Contents
Wait for around five to ten minutes before re-running kubectl get node and inspecting the new output. Why do you say that it do not need to run etcd? Export required variables Optional --- Your Kubernetes master has initialized successfully!

Note, however, that kubectl commands can be run from any of the worker nodes or from any machine where it can be installed and configured to point to a cluster. Setup Kubernetes on Ubuntu 18.

Multi-cloud Kubernetes - So we still have a single point of failure, as only one ip address can be configured. I still keep a VPS with a different provider, but now whenever I look for dedicated hardware providers, Hetzner is the bar I evaluate them against.

The setup will have one master and one minion to keep it simple. In a future article we will walk you through how to setup a Kubernetes cluster between different vDCs, which require you to use a network overlay like Flannel. This article is meant to get you familiar with the manual process for setting up Kubernetes. This guide is loosely based on the one provided by Google for Fedora. We also make use of the scripts provided in the project for setting up singe-server Ubuntu installs. Virtual DataCenter Setup The first step on your road to a Kubernetes cluster is to start by creating a new vDC using either the ProfitBricks CLI, API, or DCD R2. Once the vDC is created add two Composite Instances and one Internet Access. You will connect both instances to the Internet Access object. This will give you public connectivity. You will then need to create a private LAN between the two servers. We're using the below configuration values: Hostname Private IP kube-master 10. The second instance will be our first Kubernetes minion. You will need to following the steps on installing the pre-requisites and Kubernetes on both your master and minion instances. Component Installation Kubernetes has a few requirements, but not many and they're slowly baking these into the installation process. Ubuntu, however, has some pre-requisites it needs before you can move forward with installing and setting up Kubernetes. You will want to run the following commands in the order laid out in this tutorial. These are broken into sections, but these can be combined into a single shell script if you're feeling energetic. Install Docker First, you need Docker on both the master and its nodes. These commands come from Docker's site and ensure you're working with the most recent version. By default, using apt-get to install docker will give you version 1. You could do this after installing Kubernetes if desired, but, personally, I treat this as a pre-requisite for Kubernetes and therefore it should come prior to installing and configuring Kubernetes. Build Kubernetes Do this on both your master and minion starting with the master. You can either install Kubernetes on Ubuntu using pre-existing binaries or build from source. Since Kubernetes is rapidly iterating we will be building from source in this tutorial which gives us all the latest patches and improvements. You don't need to install Go since Kubernetes already has a Go build process when it starts its setup. This was a legacy requirement that has since been removed. Extract this archive to a folder of your choosing. Configure Kubernetes Hosts You will now need to configure your kube-master and kube-minion. First, prepare the hosts file so that both can resolve each other via their hostnames. You will need to extract the binaries from the release tar noted above. Your kube-minion will not be running etcd. This will require you to modify them. This is handy while you're learning way around, but you'll probably want to turn this down a bit before going into production. Validate Node Services You can validate that the services are running on the node by running the command: initctl list grep -E ' kube docker ' You should see the services in a running state with a PID. This applies to both the master and node. We will cover how to setup multiple minions in a future article. I have a master 192. Following your tutorial, my output likes this: NAME LABELS STATUS slave1 none NotReady Could you help me find where the problem is? And btw from kubernetes's official doc, minion should also run the etcd. Why do you say that it do not need to run etcd? Hi scuxiayiqian, I also ran into the issue where minion slave got into NotReady state. In my case issue was with the docker version being used. Check if this helps. I upgraded my docker using to 1. That needs to be either a service hosted on the master s or on its own server. I imagine breaking these services into dedicated components would be dictated by the size of cluster you wish to build. I am trying to set this up on Ubuntu 16. A lot has changed with respect to the files and directory structure in the latest Kubernetes release build. I was able to pick up the files that needed copying as instructed by you in the tutorial. The issue that I am facing is that the kube services are not starting for me and also the logs are not being generated for those services in order for me to identify the root cause of the problem. Can you please confirm if the above steps work for the new Kubernetes + Ubuntu 16. If not then it would be great if you can please update the tutorial with the steps to successfully set this up on Ubuntu 16. Thanks, Uday Hey Uday - Yes, this article has drifted from where the Kubernetes project is at now. I cannot confirm that the tutorial will work for 16.
Categories: None
The words you entered did not match the given text. Please try again.
Oops!
Oops, you forgot something.