Posts

Showing posts with the label role

Kubernetes security - Service accounts

Image
In this post we are going to learn more  about what is service accounts in Kubernetes and how that is useful. Prerequisites Kubernetes cluster Up and running Let's take the scenario where we get need to connect with the pods, nodes, deployments and other resources in the Kubernetes cluster. you might be working with the automated build with the CICD pipelines to interconnect with each other resources. Pod  is going to work with the planned application deployments. If  you're working in DevSecOps you need to focus on the regular monthly maintenance OS  patching scheduled in this case Kubernetes node maintenance should be done from a pod.  In the above two scenarios there is a need of service account inside the pod. When Kubernetes cluster is created at the same time service account also created and its name is default . We can also create our own service accounts using the following command Every service account is associated with the secret wh...

Ansible 2: Ad-hoc commands and Getting start Writing a Playbook

Image
Overview of Ansible PLAYBOOK  An Ansible playbook is a single YAML file that contains multiple plays.  Each Play will be defined with a set of activities that are treated as tasks,  and these tasks can be executed at the remote host that is the Ansible client. The task can be a single action that can be one of:   Execute a command    Run a script    install patch or package   Reboot VM/box    Restart services Simple ansible play can be  check the timestamp reboot server wait for connect back check the uptime  check timestamp  Complex ansible play Take a backup of files on 20 DB VMs Deploy application on 100 App boxes 100 servers patch apply 100 VM reboot after patch  Mail and slack notifications on patch process  Ansible ad-hoc command When you plan to write a playbook first you need to test the ad-hoc commands as trial and error will gives more confidence to run in a play # Ansible ad-...