Code Monkey home page Code Monkey logo

one_node_kubeadm's Introduction

Kubernetes Single Node Cluster Setup Script

This bash script will guide you on how to set up a single node Kubernetes cluster using kubeadm on Ubuntu 22.04. The script includes several steps like:

  1. Forwarding IPv4 and allowing iptables to see bridged traffic.
  2. Disabling swap on the system.
  3. Installing containerd as the container runtime.
  4. Installing the latest version of kubeadm, kubelet, and kubectl.
  5. Initiating kubeadm.
  6. Setting up the .kube configuration for the current user.
  7. Installing Weave Net as the network add-on.
  8. Removing the control-plane taint from the master node.

Pre-requisites

This script assumes that you have a Ubuntu 22.04 LTS system with administrative privileges.

Usage

Save the above bash script in a file, give it execute permission and then run the script.

# Give execution permissions
chmod +x install.sh

# Execute the script
./install.sh

After running the script, you need to either log out and back in, or run the following command to enable kubectl completion for bash.

source ~/.bashrc

Notes

This script sets up a single node Kubernetes cluster. The master node in this setup is untainted, allowing pods to be scheduled on it. This is not a recommended setup for a production environment, but it can be useful for learning, testing or development purposes.

To Install the Dashboard, follow these steps:

1. If using VirtualBox ensure the VM is configured to Bridge Networking (not NAT).
2. Perform a apt-get update and upgrade.
3. Install, enable, and start sshd.
4. kuebctl apply the service account.
5. Install Helm via the helm.sh
6. Install the dashboard via the dashboard.sh
7. Change the dashboard SVC to a NodeIP.
8. Run the get-token.sh for the auth token needed to log into the dashboard.
9. Go in the browser to the Node's ip and external port assigned for kubernetes-dashboard svc.

Disclaimer

Use this script at your own risk. Please understand that it makes changes to the system settings and installs several packages. Make sure you understand what each command in the script does before running it.

References

one_node_kubeadm's People

Contributors

mlmerchant avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.