Skip to content

ctienshi/kubernetes-ansible

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Kubernetes Cluster using Ansible

  • Clone repository.
  • Create multiple centos8 servers. One master and many worker. Use vagrant like here
  • Change the “ad_addr” in the env_variables file with the IP address of the Kubernetes master node.
  • Run the following command to setup the Kubernetes Master node.
ansible-playbook setup_master_node.yml
  • Once the master node is ready, run the following command to set up the worker nodes.
ansible-playbook setup_worker_nodes.yml
  • Once the workers have joined the cluster, run the following command to check the status of the worker nodes.
kubectl get nodes

Additional information

  • The IP addresses of the workers and masters added to the /etc/hosts file on all workers and masters as part of the prerequisites.yml playbook, if necessary or in case of DNS issues make sure the addresses have been added to /etc/hosts file.

Reference: