https://github.com/aw-junaid/kubernetes
Kubernetes is an open-source container orchestration system for automating software deployment, scaling, and management.
https://github.com/aw-junaid/kubernetes
Last synced: 9 months ago
JSON representation
Kubernetes is an open-source container orchestration system for automating software deployment, scaling, and management.
- Host: GitHub
- URL: https://github.com/aw-junaid/kubernetes
- Owner: aw-junaid
- License: mit
- Created: 2023-10-21T11:45:03.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-22T09:27:45.000Z (about 2 years ago)
- Last Synced: 2024-10-08T23:23:03.291Z (over 1 year ago)
- Size: 313 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README








# Installing Kubernetes on Ubuntu 18.04
Kubernetes is a powerful container orchestration platform that automates the deployment, scaling, and management of containerized applications. Here are step-by-step instructions for installing Kubernetes on Ubuntu 18.04.
## Features
- Automated bin packing: Kubernetes automatically places containers onto nodes in a cluster, optimizing resource utilization.
- Self-healing: Kubernetes automatically restarts failed containers and reschedules them onto healthy nodes.
- Horizontal scaling: Kubernetes can scale applications up or down by adding or removing containers.
- Load balancing: Kubernetes can distribute traffic across multiple containers.
- Service discovery: Kubernetes provides a built-in DNS service for discovering other containers in a cluster.
- Health checks: Kubernetes can perform health checks on containers to ensure that they are still running.
- Secrets management: Kubernetes can store and manage sensitive data, such as passwords and API keys.
- Role-based access control (RBAC): Kubernetes provides a flexible RBAC system for controlling access to resources.
## Getting Started
To get started with Kubernetes, you can use the following resources:
- Kubernetes documentation: https://kubernetes.io/docs/home/
- Kubernetes tutorials: https://kubernetes.io/docs/tutorials/
- Kubernetes playground: https://labs.play-with-k8s.com/
## 🔗 Links
[](https://awjunaid.com/)
[](https://www.linkedin.com/in/aw-junaid/)
[](https://twitter.com/abw_Junaid)
[](https://www.patreon.com/awjunaid)
[](https://www.facebook.com/abdulwahjunaid)
[](https://www.instagram.com/4wji_in41d)
[](https://www.twitch.tv/awjunaid)
[](https://vk.com/aw.junaid)
[](https://www.pinterest.com/abwjunaid/)
## Step 1: Update the System
Before you begin, it's important to ensure your system is up-to-date:
```bash
sudo apt-get update
sudo apt-get upgrade
```
## Step 2: Install Docker
Kubernetes relies on Docker for container runtime. Install Docker using the official Docker repository:
```bash
sudo apt-get install docker.io
```
## Step 3: Enable and Start Docker Service
Start and enable the Docker service to ensure it starts on boot:
```bash
sudo systemctl enable docker
sudo systemctl start docker
```
## Step 4: Install Kubernetes Tools
You'll need to install the necessary Kubernetes tools, which include `kubeadm`, `kubelet`, and `kubectl`:
```bash
sudo apt-get install -y kubelet kubeadm kubectl
```
## Step 5: Initialize Kubernetes Master Node
On the master node, initialize Kubernetes using `kubeadm`:
```bash
sudo kubeadm init --pod-network-cidr=10.244.0.0/16
```
## Step 6: Configure Kubectl
Once Kubernetes is initialized, you need to set up `kubectl`:
```bash
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
```
## Step 7: Deploy a Pod Network (Flannel)
A Pod network is required for your pods to communicate with each other. In this example, we'll use Flannel:
```bash
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
```
## Step 8: Join Worker Nodes (Optional)
If you have worker nodes, you can join them to the cluster. Use the command provided by `kubeadm init` after the master initialization.
## Step 9: Verify Cluster Status
Check the status of your cluster:
```bash
kubectl get nodes
kubectl get pods --all-namespaces
```
Congratulations! You've successfully installed Kubernetes on Ubuntu 18.04.
Please note that this is a basic setup. Depending on your specific requirements, you may need to configure additional features or install additional components. Always refer to the official documentation for the latest information.