π₯π₯ Today's Technotes π₯π₯
Suppose you have 3 containers running and out of these, you wish to access one of them. How do you access a running container?
The following command lets us access a running container:
$ docker exec -it <container id> bash
Suppose you have 3 containers running and out of these, you wish to access one of them. How do you access a running container?
The following command lets us access a running container:
$ docker exec -it <container id> bash
π₯π₯ Today's Technotes π₯π₯
How to start, stop and kill a container?
The following command is used to start a docker container:
$ docker start <container_id>
and the following for stopping a running container:
$ docker stop <container_id>
kill a container with the following command:
$ docker kill <container_id>
How to start, stop and kill a container?
The following command is used to start a docker container:
$ docker start <container_id>
and the following for stopping a running container:
$ docker stop <container_id>
kill a container with the following command:
$ docker kill <container_id>
π₯π₯ Today's Technotes π₯π₯
How do you create a docker container from an image?
Pull an image from docker repository with the above command and run it to create a container. Use the following command:
$ docker run -it -d <image_name>
How do you create a docker container from an image?
Pull an image from docker repository with the above command and run it to create a container. Use the following command:
$ docker run -it -d <image_name>
π₯π₯ Today's Technotes π₯π₯
Kuberntes + Jenkins + GitHub Explained step by step:
Video Link: https://youtu.be/kFmswA19aVY
Useful info
Kuberntes + Jenkins + GitHub Explained step by step:
Video Link: https://youtu.be/kFmswA19aVY
Useful info
YouTube
Sample Kubernetes + Jenkins + GitHub Project | Kubernetes Jenkins Pipeline
Hi-Tech Institution
Ph: 82202 17640 and 7092 90 91 92
All Technical Training, all over the world.
Cloud Computing, All Cloud Providers, Dev Ops, open-source tools, DevOps tools, Development
To get Hands-on Training Reach us on: 7092 90 91 92 / 82 20β¦
Ph: 82202 17640 and 7092 90 91 92
All Technical Training, all over the world.
Cloud Computing, All Cloud Providers, Dev Ops, open-source tools, DevOps tools, Development
To get Hands-on Training Reach us on: 7092 90 91 92 / 82 20β¦
π₯π₯ Today's Technotes π₯π₯
Authentication and authorization in Amazon EKS
Amazon EKS uses IAM to provide authentication to your Kubernetes cluster.
When you use kubectl to interact with Amazon EKS under the hood it uses the aws eks get-token command, available in version 1.18.49 or later of the AWS CLI, or the AWS IAM Authenticator for Kubernetes to fetch an authentication token, which is passed along in the Authorization header of an HTTP request sent to the Kubernetes API server.
Link: https://aws.amazon.com/blogs/containers/kubernetes-rbac-and-iam-integration-in-amazon-eks-using-a-java-based-kubernetes-operator/
Authentication and authorization in Amazon EKS
Amazon EKS uses IAM to provide authentication to your Kubernetes cluster.
When you use kubectl to interact with Amazon EKS under the hood it uses the aws eks get-token command, available in version 1.18.49 or later of the AWS CLI, or the AWS IAM Authenticator for Kubernetes to fetch an authentication token, which is passed along in the Authorization header of an HTTP request sent to the Kubernetes API server.
Link: https://aws.amazon.com/blogs/containers/kubernetes-rbac-and-iam-integration-in-amazon-eks-using-a-java-based-kubernetes-operator/
Amazon
Kubernetes RBAC and IAM Integration in Amazon EKS using a Java-based Kubernetes Operator | Amazon Web Services
Introduction A Kubernetes native application is one that is deployed on a Kubernetes cluster and managed both using Kubernetes APIs as well as client-side tools such as kubectl. A Kubernetes Operator is an abstraction for deploying non-trivial Kubernetesβ¦
π₯π₯ Today's Technotes π₯π₯
Resource in RBAC:
A pod, service, or secret that the entity wants to access using the certain operations.
Resource in RBAC:
A pod, service, or secret that the entity wants to access using the certain operations.
π₯π₯ Today's Technotes π₯π₯
Role in RBAC:
Used to define rules for the actions the entity can take on various resources.
Role in RBAC:
Used to define rules for the actions the entity can take on various resources.
π₯π₯ Today's Technotes π₯π₯
Role binding in RBAC:
This attaches (binds) a role to an entity, stating that the set of rules define the actions permitted by the attached entity on the specified resources.
Role binding in RBAC:
This attaches (binds) a role to an entity, stating that the set of rules define the actions permitted by the attached entity on the specified resources.
π₯π₯ Today's Technotes π₯π₯
Entity in RBAC:
A group, user, or service account (an identity representing an application that wants to execute certain operations (actions) and requires permissions to do so).
Entity in RBAC:
A group, user, or service account (an identity representing an application that wants to execute certain operations (actions) and requires permissions to do so).
π₯π₯ Today's Technotes π₯π₯
When to Use Multiple Namespaces in Kubernetes?
Namespaces are intended for use in environments with many users spread across multiple teams, or projects. For clusters with a few to tens of users, you should not need to create or think about namespaces at all. Start using namespaces when you need the features they provide.
Namespaces provide a scope for names. Names of resources need to be unique within a namespace, but not across namespaces. Namespaces cannot be nested inside one another and each Kubernetes resource can only be in one namespace.
When to Use Multiple Namespaces in Kubernetes?
Namespaces are intended for use in environments with many users spread across multiple teams, or projects. For clusters with a few to tens of users, you should not need to create or think about namespaces at all. Start using namespaces when you need the features they provide.
Namespaces provide a scope for names. Names of resources need to be unique within a namespace, but not across namespaces. Namespaces cannot be nested inside one another and each Kubernetes resource can only be in one namespace.
AWS DEVOPS π€ Cloud Training βοΈ
Click on the link below to join our whatsapp group
https://chat.whatsapp.com/FPLsEqXJfPuHeLST0d4CIg
AWS DEVOPS
DATE: 9-Mar-2022
TIME: 7PM IST
We provide free session also to boost up your knowledge here.
#AWS #DEVOPS #PROJECT #TRAINING
Click on the link below to join our whatsapp group
https://chat.whatsapp.com/FPLsEqXJfPuHeLST0d4CIg
AWS DEVOPS
DATE: 9-Mar-2022
TIME: 7PM IST
We provide free session also to boost up your knowledge here.
#AWS #DEVOPS #PROJECT #TRAINING
WhatsApp.com
AWS Azure Devops Study340
WhatsApp Group Invite
π₯π₯ Today's Technotes π₯π₯
Working with Namespaces
Viewing namespaces - kubectl get namespace
Working with Namespaces
Viewing namespaces - kubectl get namespace
π₯π₯ Today's Technotes π₯π₯
Kubernetes starts with four initial namespaces:
default: The default namespace for objects with no other namespace
kube-system: The namespace for objects created by the Kubernetes system
kube-public: This namespace is created automatically and is readable by all users (including those not authenticated). This namespace is mostly reserved for cluster usage, in case that some resources should be visible and readable publicly throughout the whole cluster. The public aspect of this namespace is only a convention, not a requirement.
kube-node-lease: This namespace holds Lease objects associated with each node. Node leases allow the kubelet to send heartbeats so that the control plane can detect node failure.
Kubernetes starts with four initial namespaces:
default: The default namespace for objects with no other namespace
kube-system: The namespace for objects created by the Kubernetes system
kube-public: This namespace is created automatically and is readable by all users (including those not authenticated). This namespace is mostly reserved for cluster usage, in case that some resources should be visible and readable publicly throughout the whole cluster. The public aspect of this namespace is only a convention, not a requirement.
kube-node-lease: This namespace holds Lease objects associated with each node. Node leases allow the kubelet to send heartbeats so that the control plane can detect node failure.
π₯π₯ Today's Technotes π₯π₯
Namespaces and DNS
When you create a Service, it creates a corresponding DNS entry.
This entry is of the form <service-name>.<namespace-name>.svc.cluster.local, which means that if a container only uses <service-name>, it will resolve to the service which is local to a namespace.
This is useful for using the same configuration across multiple namespaces such as Development, Staging and Production. If you want to reach across namespaces, you need to use the fully qualified domain name (FQDN).
Namespaces and DNS
When you create a Service, it creates a corresponding DNS entry.
This entry is of the form <service-name>.<namespace-name>.svc.cluster.local, which means that if a container only uses <service-name>, it will resolve to the service which is local to a namespace.
This is useful for using the same configuration across multiple namespaces such as Development, Staging and Production. If you want to reach across namespaces, you need to use the fully qualified domain name (FQDN).
π₯π₯ Today's Technotes π₯π₯
Not All Objects are in a Namespace
Most Kubernetes resources (e.g. pods, services, replication controllers, and others) are in some namespaces. However namespace resources are not themselves in a namespace. And low-level resources, such as nodes and persistentVolumes, are not in any namespace.
To see which Kubernetes resources are and aren't in a namespace:
# In a namespace
kubectl api-resources --namespaced=true
# Not in a namespace
kubectl api-resources --namespaced=false
Not All Objects are in a Namespace
Most Kubernetes resources (e.g. pods, services, replication controllers, and others) are in some namespaces. However namespace resources are not themselves in a namespace. And low-level resources, such as nodes and persistentVolumes, are not in any namespace.
To see which Kubernetes resources are and aren't in a namespace:
# In a namespace
kubectl api-resources --namespaced=true
# Not in a namespace
kubectl api-resources --namespaced=false
π₯π₯ Today's Technotes π₯π₯
What is Jobs Kubernetes?
A Job creates one or more Pods and will continue to retry execution of the Pods until a specified number of them successfully terminate.
As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete.
Deleting a Job will clean up the Pods it created.
Suspending a Job will delete its active Pods until the Job is resumed again.
What is Jobs Kubernetes?
A Job creates one or more Pods and will continue to retry execution of the Pods until a specified number of them successfully terminate.
As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete.
Deleting a Job will clean up the Pods it created.
Suspending a Job will delete its active Pods until the Job is resumed again.
π₯π₯ Today's Technotes π₯π₯
Running an example Job in Kubernetes
apiVersion: batch/v1
kind: Job
metadata:
name: pi
spec:
template:
spec:
containers:
- name: pi
image: perl
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
restartPolicy: Never
backoffLimit: 4
You can run the example with this command:
kubectl apply -f https://kubernetes.io/examples/controllers/job.yaml
Running an example Job in Kubernetes
apiVersion: batch/v1
kind: Job
metadata:
name: pi
spec:
template:
spec:
containers:
- name: pi
image: perl
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
restartPolicy: Never
backoffLimit: 4
You can run the example with this command:
kubectl apply -f https://kubernetes.io/examples/controllers/job.yaml
π₯π₯ Today's Technotes π₯π₯
How to Clean up finished jobs automatically
Finished Jobs are usually no longer needed in the system.
Keeping them around in the system will put pressure on the API server.
If the Jobs are managed directly by a higher level controller, such as CronJobs, the Jobs can be cleaned up by CronJobs based on the specified capacity-based cleanup policy.
How to Clean up finished jobs automatically
Finished Jobs are usually no longer needed in the system.
Keeping them around in the system will put pressure on the API server.
If the Jobs are managed directly by a higher level controller, such as CronJobs, the Jobs can be cleaned up by CronJobs based on the specified capacity-based cleanup policy.
π₯π₯ Today's Technotes π₯π₯
what is Bare Pods in Kubernetes?
When the node that a Pod is running on reboots or fails, the pod is terminated and will not be restarted. However, a Job will create new Pods to replace terminated ones. For this reason, we recommend that you use a Job rather than a bare Pod, even if your application requires only a single Pod
what is Bare Pods in Kubernetes?
When the node that a Pod is running on reboots or fails, the pod is terminated and will not be restarted. However, a Job will create new Pods to replace terminated ones. For this reason, we recommend that you use a Job rather than a bare Pod, even if your application requires only a single Pod