Skip to main content

aws&Devops Interview questions and answers

 1.How to mount unmount  a disk ?


First we can check disk partition fdisk -l or lsblk 


* we can create a directory where we want mount

   sudo mkdir /mnt/mydisk

*we can use mount command to mount the disk

   sudo mount /dev/sdXn /mnt/mydisk

*To unmount disk

    sudo umount /mnt/mydisk


2. How to unlock the username?


*If a user account is locked due to multiple failed login attempts

Then we can use below command

 sudo passwd -u username


3.How to set user to NO LOGIN


*If we don't require interactive logins.

Then we can use below command

sudo usermod --shell /usr/sbin/nologin username

The usermod command can be used to modify user account properties


4.what are the process states in linux


The Linux process states are many


*Running (R).   : we are executing instructions on CPU


*Sleeping(S)    : Sleeping processes are not using CPU resources


* Stopped (T).  : A stopped process can be resumed or terminated.


*Zombie (Z):    :  In an operating system ,processes that are terminated but , for some reason must have its task structure in the process table are referred as    

Zombie.(or) The child process completes execution, but the parent keeps executing, then the child process is known as Zombie.


*Dead (D):         The process has been terminated,Dead processes are waiting for their parent to acknowledge their termination.


We have group of people who are attending interviews on AWS&devops working together to improve practical knowledge and to clear interview by own . To join please ping me 9154078579 i am going to add in Skype group.

Comments

Popular posts from this blog

How to copy files from one server to another server by using ansible copy module

 We have two servers 1.master 2.worker1 create playbook example: play.yml ---   - hosts: all     tasks:     - name: Ansible copy file to remote server       copy:        src: ~/kube-cluster        dest: /root Run ansible playbook  ansible-playbook play.yml

Kubernetes interview questions and answers

1.H ow to setup kubernetes dashboard on ubuntu16.04 cluster? To create kubernetes dashboard follow below link https://docs.aws.amazon.com/eks/latest/userguide/dashboard-tutorial.html To deploy the Metrics Server kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.3.6/components.yaml kubectl get deployment metrics-server -n kube-system Deploy the dashboard kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml root@ip-172-31-43-76:~# kubectl get svc -n kubernetes-dashboard NAME                        TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)         AGE dashboard-metrics-scraper   ClusterIP   10.102.6.123   <none>        8000/TCP        120m kubernetes-dashboard  ...

How to create a user in kubernetes cluster and assign read only permissions

root@ip-172-31-16-42:~# kubectl get secrets NAME                  TYPE                                  DATA   AGE default-token-2m258   kubernetes.io/service-account-token   3      48m root@ip-172-31-16-42:~ # kubectl create serviceaccount readonlyuser serviceaccount/readonlyuser created root@ip-172-31-16-42:~# kubectl create clusterrole readonlyuser --verb=get --verb=list --verb=watch --resource=pods clusterrole.rbac.authorization.k8s.io/readonlyuser created root@ip-172-31-16-42:~ # kubectl create clusterrolebinding readonlyuser --serviceaccount=default:readonlyuser --clusterrole=readonlyuser clusterrolebinding.rbac.authorization.k8s.io/readonlyuser created root@ip-172-31-16-42:~# TOKEN=$(kubectl describe secrets "$(kubectl describe serviceaccount readonlyuser | grep -i Tokens | awk '{print $2}')" | g...