top of page

Microservices K8 Ready

  • Writer: Anand Nerurkar
    Anand Nerurkar
  • Jul 14, 2022
  • 1 min read

Updated: Sep 13, 2023

How To Make Microservices Kubernetes Ready


Prerequisite

· Kubernetes

· Docker

· K8 cluster-will make use of GCP K8 cluster

Sample Microservices Architecture



· K8 Deployment

· K8 services

· K8 loadbalancer type for exposing services

·

kubectl comand

---

kubectl cluster-info

kubectl get node

kubectl create deployment deployment-name --image=image name --port=8080

kubectl get deployment

kubectl describe deployment deployment-name

kubectl get pods

kubectl logs nameofpod


# in a namespace

kubectl api-resource --namespaced=true


#not in a namespace

kubctl api-resource --namespaced=falseV


expose deployment

==

kubectl get deployments

kubectl expose deployment deployment-name --type=NodePort

kubectl get service


Kubenetes Namespaces

===

default namespace is virtual cluster withinh k8 cluster. It is normally for system realted work, we should not store our application in this namespace.



Better Approach

==



Below are the k8 default namespaces

kubectl get namespaces




Namespace type

====

deafult

if namepace is not defined,then all resources will be tagged to default namespace.


kube-system

This is reseved for k8 resources while creating k8 cluster

for eg: Master Node- API Server,Controller Manager,Schedular,ETCD

Worker Node - Kubelet,kubeproxy


It is not recommended to use this namespace for our application resources like pod,deployment,service etc....


kube-public

This is open for all, it has all cluster information.Everyone can read and access this namespace.


kube-node-lease

This is associated with lease object for each node and improve the performance of node and heartbeats.



We can create our namespace and application resources will be tagged to that namespace.



#to create namespace

kubectl create namespace my-namespace


# to deploy resources in my-namespace

kubectl apply -f deploy.yml --namespace=my-namespace


# to get resources in my-namespace

kubectl get deployment -n my-namespace

kubectl get pods -n my-namespace








 
 
 

Recent Posts

See All
RFP PRE/POST-PROPOSAL SUBMISSION FLOW

🏆 1. The 5 Pillars to Win a Large Strategic Deal 1. Understand the Client Better Than They Do 👉 Don’t just read RFP — decode it What is their real problem ? What is driving this deal? (compliance, c

 
 
 
DIGITAL LENDING RFP Solution

🎯 RFP Proposal SOLUTION PRESENTATION – DIGITAL LENDING (WITH COLOR-CODED ARCHITECTURE) 1️⃣ Opening “Thank you for the opportunity. I’ll walk you through our approach to building a next-generation dig

 
 
 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
  • Facebook
  • Twitter
  • LinkedIn

©2024 by AeeroTech. Proudly created with Wix.com

bottom of page