An example microservice demo using kubernetes concepts like deployment, services, persistent volume and claims, secrets and helm chart

Docker vs Kubernetes

Docker Kubernetes
container tech, isolated env for apps infra management, multiple containers
automated builds and deploy apps - CI automated scheduling and management of app containers
platform for config, build & destribute containers ecosystem for managing cluster of containers

Docker Swarm vs Kubernetes

Docker Swarn Kubernetes
complex install easy install
high learning curve, but powerful easy to use, limited functionality
auto-scaling manual scaling
built in monitoring N/A
manual load balancing auto load balancing

Create deplyment

kubectl create deployment example-db-depl --image=abhijitwakchaure/example-db:1.0.0 --port=8081 --replicas=2

OR

kubectl apply -f db-deployment.yml

Create service

kubectl apply -f app-service.yml

Expose deployment

kubectl expose deployment example-db-depl --name=example-db-srv --port=8081 --target-port=8081 --type ClusterIP

Scale deployment

kubectl scale deployment example-app-depl --replicas=5

Test with multiple requests

for n in {1..100}; do printf "%5s" "$n. "; curl http://192.168.49.2:31277; echo ""; sleep 0.3; done

Inject linkerd

kubectl get deploy -o yaml | linkerd inject - | kubectl apply -f -

Helm Commands

Create new chart

helm create example-chart

Install chart

Test the rendered/compiled yaml files before install

helm install my-chart example-chart --dry-run

Now deploy the chart

helm install my-chart example-chart

OR using custom values

helm install my-chart example-chart -f customValues.yml

Delete chart

helm delete my-chart
Owner
Similar Resources

A code generator that turns plain old Go services into RPC-enabled (micro)services with robust HTTP APIs.

Frodo is a code generator and runtime library that helps you write RPC-enabled (micro) services and APIs.

Dec 16, 2022

Services-inoeg - The Kiebitz Backend Services. Still a work-in-progess, use with care!

Kiebitz Services This repository contains Kiebitz's backend services: A storage service that stores encrypted user & operator settings and temporary d

Jan 19, 2022

Go microservice tutorial project using Domain Driven Design and Hexagonal Architecture!

"ToDo API" Microservice Example Introduction Welcome! 👋 This is an educational repository that includes a microservice written in Go. It is used as t

Jan 4, 2023

An production-ready microservice using Go and a few lightweight libraries

An production-ready microservice using Go and a few lightweight libraries

Go Micro Example This small sample project was created as a collection of the various things I've learned about best practices building microservices

Dec 26, 2022

Example golang microservices deployed on kubernetes.

Example golang microservices deployed on kubernetes.

Tech Stack Golang RabbitMQ Docker K8S MongoDB Services There are two services which communicate via http(sync) and rabbitmq(async). Services opened to

Sep 6, 2022

Sample full stack micro services application built using the go-Micro framework.

Sample full stack micro services application built using the go-Micro framework.

goTemp goTemp is a full stack Golang microservices sample application built using go-micro. The application is built as a series of services that prov

Dec 26, 2022

This is an example to demonstrate implementation golang microservices using domain driven design principles and sugestions from go-kit

go-kit DDD Domain Driven Design is prevelent and rising standard for organizing your microservice code. This design architecture emphasis on Code orga

Feb 9, 2022

Microservice Boilerplate for Golang with gRPC and RESTful API. Multiple database and client supported

Microservice Boilerplate for Golang with gRPC and RESTful API. Multiple database and client supported

Go Microservice Starter A boilerplate for flexible Go microservice. Table of contents Features Installation Todo List Folder Structures Features: Mult

Jul 28, 2022

Kitex byte-dance internal Golang microservice RPC framework with high performance and strong scalability, customized extensions for byte internal.

Kitex byte-dance internal Golang microservice RPC framework with high performance and strong scalability, customized extensions for byte internal.

Kitex 字节跳动内部的 Golang 微服务 RPC 框架,具有高性能、强可扩展的特点,针对字节内部做了定制扩展。

Jan 9, 2023
String Service. Microservice example using gokit library

Example of Microservices using go-kit Go kit is a collection of Go (golang) packages (libraries) that help you build robust, reliable, maintainable mi

Dec 6, 2021
This is demo / sample / example project using microservices architecture for Online Food Delivery App.

Microservices This is demo / sample / example project using microservices architecture for Online Food Delivery App. Architecture Services menu-servic

Nov 21, 2022
Authentication-microservice - Microservice for user authentication built with golang and gRPC

Authentication-microservice - Microservice for user authentication built with golang and gRPC

May 30, 2022
Customer-microservice - Microservice of customer built with golang and gRPC

?? Building microservices to manage customer data using Go and gRPC Command to g

Sep 8, 2022
Microservice - A sample architecture of a microservice in go

#microservice Folder structure required. service certs config config.yaml loggin

Feb 3, 2022
Microservice - Microservice golang & nodejs
Microservice - Microservice golang & nodejs

Microservice Gabungan service dari bahasa pemograman go, nodejs Demo API ms-auth

May 21, 2022
🔥 Kubernetes multi-cluster deployment automation service.
🔥  Kubernetes multi-cluster deployment automation service.

Beetle Kubernetes multi-cluster deployment automation service ?? Check out the demo! Application deployment and management should be automated, audita

Dec 11, 2022
a microservice framework for rapid development of micro services in Go with rich eco-system
a microservice framework for rapid development of micro services in Go with rich eco-system

中文版README Go-Chassis is a microservice framework for rapid development of microservices in Go. it focus on helping developer to deliver cloud native a

Dec 27, 2022
Go-rifa-microservice - Clean Architecture template for Golang services
Go-rifa-microservice - Clean Architecture template for Golang services

Test CI Go Clean template Clean Architecture template for Golang services Overvi

Sep 22, 2022
Trying to build an Ecommerce Microservice in Golang and Will try to make it Cloud Native - Learning Example extending the project of Nic Jackson

Golang Server Project Best Practices Dependency Injection :- In simple words, we want our functions and packages to receive the objects they depend on

Nov 28, 2022