Introduction to Kubernetes
Kubernetes, often abbreviated as K8s, is a powerful open-source platform designed to automate deploying, scaling, and operating application containers. Here's a quick overview of its key concepts:
- Nodes: Individual servers in the Kubernetes architecture.
- Cluster: A group of nodes working together.
- Pods: The smallest deployable units in Kubernetes, which run containers on nodes.
Master Components of Kubernetes
The Kubernetes master components manage the cluster and its workload:
- API Server: Provides the CLI and RESTful API interface for interaction.
- Scheduler: Assigns nodes to newly created pods.
- ETCD: A key-value store that holds the entire cluster's state, including nodes and pods.
- Control Manager: Ensures the desired state of the cluster is maintained.
Worker Node Components
Worker nodes run the applications and perform the following functions:
- Kubelet: Ensures that containers are running in pods.
- Kube Proxy: Manages network rules to enable communication with pods.
- Container Runtime: Runs the containers.
Kubernetes Installation on Red Hat Linux
Step 1: Install Kubectl
1. Update the Repository:
2. Install Kubectl:
3. Verify Installation:
Step 2: Install Minikube
Minikube is a tool that makes it easy to run Kubernetes locally, ideal for learning and development purposes.
1. Download Minikube:
2. Install Minikube:
3. Start Minikube:
Handling Sudo User Permission Errors
If you encounter permission errors as a sudo user, follow these steps
- Switch User:
if you are logged in as a sudo user switch to any other use or create a new user I have user Danish already
command: su - username
- Add User to Docker Group:
command: sudo usermod -aG docker $USER && newgrp docker
after adding this user to the group now start the minikube again
- Edit the Sudoers File (if still getting error):
- Use
visudo
to add your user, ensuring proper permissions - After resolving permissions, run: minikube start
Check Minikube Status:
command: minikube status
0 comments: