Git Product home page Git Product logo

kubernetes-sample's Introduction

Kubernetes Beginner Project

This repository contains a simple kubernetes project with multiple pods and a load balancer based on NGINX.

Pieces of the project

Deployments

Deployments are the basic unit of kubernetes, within them you can find how each component is defined and configured. In this example there are three deployments as follow:

Services

Services define the way each pod is exposed, either to other services within the cluster or to an external network. These are as follow:

Secrets

There are times when a service needs to ofuscate information that could be sensitive. Kubernetes offers a secret object that allows for this information to be stored without being shared. Normally this information would be excluded from the version control.

Configurations

As the name implies, this components give a better control when configuring services, allowing for more readable and better configured environments. in this example, the database and load balancer were configured to allow a correct function of the application.

Deploying the project

In this example Minikube was used to provide a local cluster in which to deploy the application, to install it just follow the instructions.

Once installed and started, it is possible to begin with the deployment. It is important to take into account the existing dependencies between components in order to avoid errors. In this case, the order to follow is the following:

  1. Secrets & Configurations
  2. Database deployment & service
  3. Main deployment & service
  4. Load balancer deployment
  5. Load balancer service

Finally, to access the service you can use the command minikube service nginx-service

Author

Alejandro Espinosa

kubernetes-sample's People

Contributors

halbardhobby avatar

Watchers

James Cloos 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.