Concepts, Q/A, References While Doing DevOps

On this post, I will continue to add important references, concepts , Q/A while doing DevOps

A POD is not a scalable unit. A Deployment that schedules PODs is.

A Deployment is meant to represent a single group of PODs fulfilling a single purpose together.

You can have many Deployments work together in the virtual network of the cluster.

For accessing a Deployment that may consist of many PODs running on different nodes you have to create a Service.

Deployments are meant to contain stateless services. If you need to store a state you need to create StatefulSet instead (e.g. for a database service).

 

  1. Imperative commands – a user operates directly on live objects of a cluster, for example
    kubectl create deployment <name-of-deployment> --image nginx
    kubectl edit deployment <name-of-deployment>
    

    https://kubernetes.io/docs/tasks/manage-kubernetes-objects/imperative-command/

  2. Imperative object configuration – the kubectl command specifies the operation, optional flags and at least one file name. The file specified must contain a full definition of the object in YAML or JSON format, for example
    kubectl create -f nginx.yaml
    kubectl replace -f nginx.yaml
    kubectl delete -f nginx.yaml
    

    https://kubernetes.io/docs/tasks/manage-kubernetes-objects/imperative-config/

  3. Declarative object configuration – a user operates on object configuration files stored locally, however the user does not define the operations to be taken on the files. Create, update, and delete operations are automatically detected per-object by kubectl, for example
    kubectl apply -f nginx.yaml
    kubectl apply -f configs/
    

    https://kubernetes.io/docs/tasks/manage-kubernetes-objects/declarative-config/

For Multiple Deployment At once : create multiple copies of the deployment config into directory “deployments”, amending the names and command and then running:

kubectl create -f deployments/

Currently, all containers in a Pod are being started in parallel and there is no way to define that one container must be started after other container.

References :

https://www.mirantis.com/blog/multi-container-pods-and-container-communication-in-kubernetes/

How do i handle multiple deployment environments with minimal effort in kubernetes?

https://stackoverflow.com/questions/49477706/how-do-i-handle-multiple-deployment-environments-with-minimal-effort-in-kubernet

Kubernetes Application with multiple Resources single YAML

https://stackoverflow.com/questions/52255883/kubernetes-application-with-multiple-resources-single-yaml

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s