What will be a project level approach in Kubernetes?

12/26/2019

My company has one project which required 3-4 days of deployment time. I thought about it and try to make one deployment modal for this project using Kubernetes.

I read all about it but getting into project-level create some problem. What is done till now...

  1. Created Kubernetes cluster with one master node and one worker node in ubuntu VM.
  2. Understand I need to create a Deployment file, Service file, Persistent volume, and claim.
  3. Created a custom image with the base image as CentOS7 and python2.7 with certain requirements and uploaded them on the docker hub.

Now I created one Deployment.yml file to pull that image but it is Showing CrashLoopBackOff error and IT IS NOT able to pull the image through Deployment.yml file

Note: I pulled the image separately using docker and it is working.

Thanks in advance :)

-- Dheeraj Dashora
docker
kubernetes

2 Answers

12/26/2019

I'd go with one cluster for production and one cluster for development/testing. Within the cluster you can use namespaces to isolate group of applications. For example every developer has its own namespace for testing.

-- Simon
Source: StackOverflow

12/26/2019

It is a very wide area but I could give you certain high level points with respect to kubernetes.

  • Create different clusters for different projects. Also create different cluster for different environment like QA, Dev, Production.
  • Set resource quotas for individual projects. Also your deployments should have resource limits for RAM and CPUs. Precisely estimate the resource demand for each and every application.
  • Use namespaces for logical separation and using tags is always a good approach.
  • If you want to follow template based approach, you could search about helm charts.
  • You k8s nodes, disks, deployments, services, ingress any other kind of kubernetes object you create should have labels.
  • Use node auto scaling (cloud specific) and horizontal pod auto scaling techniques for better scaling and resilience.
  • Always try to distribute your k8s deployments across region for fail-over strategy. If anything goes down in some part of your hosted region then your application should sustain it.
  • In case your want to move project to some reputed cloud provider, try to integrate cloud provided security and firewall rules with your k8s cluster.

I hope this would help.

-- Ady
Source: StackOverflow