Skip to content

aviralgarg05/Cyclops-Beginners-Guide

Repository files navigation

Cyclops Beginner's Guide

Welcome to the Cyclops Beginner's Guide! This repository is your starting point for mastering Cyclops with Kubernetes. This guide has been created after successfully deploying a sample web application using Docker and Kubernetes, and it will provide you with essential tools and insights to get up and running quickly with Cyclops.

Back Story

While creating the Automatic Web App, I inurred various issues, missing documentations, guides, tutorials and error solving cases.... Hence to prevent all such here's a beginners guide for working on Cyclops-UI using Kubernetes Engine and Docker.

🚀 Table of Contents

  1. Introduction
  2. Prerequisites
  3. Installation
  4. Basic Configuration
  5. Getting Started
  6. Common Commands
  7. Troubleshooting
  8. Additional Resources
  9. Contributing
  10. License

📝 Introduction

Cyclops simplifies Kubernetes management with an easy-to-use interface. This guide, created after deploying a web application using Docker and Kubernetes, will help you install and configure Cyclops, deploy applications, and troubleshoot common issues effectively.

Cyclops Overview

📋 Prerequisites

Before you begin, ensure you have:

💻 Installation

Using Minikube

  1. Install Minikube:

    curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
    sudo install minikube-linux-amd64 /usr/local/bin/minikube
  2. Start Minikube:

    minikube start
  3. Verify Installation:

    kubectl version --client
    minikube status

Using Kubeadm

  1. Install Kubeadm and kubectl:

    sudo apt-get update && sudo apt-get install -y kubelet kubeadm kubectl
  2. Initialize the Cluster:

    sudo kubeadm init
  3. Set Up kubeconfig:

    mkdir -p $HOME/.kube
    sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
    sudo chown $(id -u):$(id -g) $HOME/.kube/config
  4. Verify Installation:

    kubectl get nodes

🛠 Basic Configuration

  1. Set up kubectl:

    kubectl config view
  2. View Cluster Information:

    kubectl cluster-info

🚀 Getting Started

Deploy a Sample Application

This section walks you through deploying a sample web application that was used to create this guide.

  1. Create a Docker Image:

    Follow the Dockerfile and nginx.conf in the repository to build a Docker image for the sample application.

  2. Build and Push Docker Image:

    docker build -t web-app:latest .
    docker tag web-app:latest your-dockerhub-username/web-app:latest
    docker push your-dockerhub-username/web-app:latest
  3. Create a Kubernetes Deployment:

    kubectl create deployment web-app --image=your-dockerhub-username/web-app:latest
  4. Expose the Deployment:

    kubectl expose deployment web-app --port=80 --type=NodePort
  5. Verify Deployment and Service:

    kubectl get deployments
    kubectl get services

    Sample Application Deployment

📜 Common Commands

  • List Pods:

    kubectl get pods
  • View Logs:

    kubectl logs <pod-name>
  • Scale Deployment:

    kubectl scale deployment web-app --replicas=3

🛠 Troubleshooting

Command Not Found

Ensure that kubectl and cyclops are in your PATH.

which kubectl
which cyclops

Configuration File Errors

Check and correct your kubeconfig file.

nano $HOME/.kube/config

Authentication Failure

Update the authentication token or certificate in kubeconfig.

nano $HOME/.kube/config

Connection Issues

Verify the API server URL and network connectivity.

curl -k https://api-server-url

📚 Additional Resources

🤝 Contributing

We welcome contributions! To get involved:

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Make your changes and test them.
  4. Submit a pull request with a detailed description.

📜 License

This project is licensed under the MIT License.