Skip to content

0lai0/kubernetes-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kubernete-shell

Overview

This shell script sets up a Kubernetes Master node on a physical machine running Ubuntu 22.04 LTS. It installs all required dependencies, configures the system, and initializes a Kubernetes cluster.

How to Use

  1. Download the Script

    • Save the script
  2. Make it Executable

    • Run this command:
      chmod +x <file>.sh
      
  3. Run the Script

    • Execute it with sudo:
      sudo ./<file>.sh
      
    • Follow the prompts to confirm or enter the Master node IP.
  4. Check the Results

    • After completion, check the cluster status:
      kubectl get nodes
      
    • View the log file if there are issues:
      cat kubeadm_init.log
      
    • Find the Worker node join command:
      cat k8s-join-command.txt
      

Output Files

  • kubeadm_init.log: Log of the Kubernetes initialization process.
  • k8s-join-command.txt: Command to join Worker nodes to the cluster.

Customization

  • Kubernetes Version: Edit K8S_VERSION in the script (e.g., 1.29.2-1.1).
  • Pod Network: Change POD_CIDR if needed (default is 10.244.0.0/16).

Troubleshooting

  • If the IP detection fails, manually enter the correct IP when prompted.
  • For hardware errors, ensure your machine meets the minimum requirements.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages