Skip to content

Provisioning and configuring a basic Kubernetes cluster

Notifications You must be signed in to change notification settings

andrepearce/simple-k8s-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-k8s-cluster

This repository contains anisble roles and a playbook that will provision a basic Kubernetes cluster to the provided master and nodes in the inventory.yaml file.

Pre-requisites

  • CentOS7 has been installed on the master and nodes.
  • Ensure the hostname of each machine is unique.
  • Setup SSH Keys on the master and nodes. The inventory.yaml file has been configured to look for SSH keys at ./ssh-keys.
  • Ensure each machine is able to reach the internet.
  • Each machine needs to have a static IP.

Provisioning

The below steps are an example of how you can use this playbook to provision a Kubernetes cluster:

  1. cd to the root directory of this repository.
  2. Edit inventory.yaml to contain the details of the hosts you are provisioning to.
  3. Execute ./provision.yaml.

Accessing the cluster

After provisioning, a file will be created at output/kubernetes/config. This is a kube config file that provides admin access to the cluster. Move this file to ~/.kube.

mv output/kubernetes/config ~/.kube/config

About

Provisioning and configuring a basic Kubernetes cluster

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published