0% found this document useful (0 votes)
2 views1 page

Ec2 Instance Commands

The document outlines steps for managing EC2 instances and Nginx configurations, including navigating to directories, pulling updates from Git, and editing Nginx configuration files. It also details commands for checking Nginx syntax, reloading the service, and using kubectl commands to manage pods and deployments in Kubernetes. Additionally, it provides instructions for deleting a pod if necessary.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Ec2 Instance Commands

The document outlines steps for managing EC2 instances and Nginx configurations, including navigating to directories, pulling updates from Git, and editing Nginx configuration files. It also details commands for checking Nginx syntax, reloading the service, and using kubectl commands to manage pods and deployments in Kubernetes. Additionally, it provides instructions for deleting a pod if necessary.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

--- After Landing on the ec2 instances ---

1) cd /var/www/backend-services/nms_reports/generation - Report service directory


2) ll
3) git pull
3) git branch

--- Nginx configuration to check ---


1) sudo cat /etc/nginx/conf.d/nms.conf

-- To edit above nginx


1) sudo nano /etc/nginx/conf.d/nms.conf

Here in console no ctrl+v/c will not work

--- to update the changes

1) ctrl+o
2) enter
3) ctrl+x

--- to remove the line ctrl+k

--- To check the indentation ---

sudo nginx -t

-- After checkning the indentation then process with that

-- Then need to restart/reload the system

sudo systemctl reload or restart nginx.service

To use the kubetcl commands


---------------------------
1) kubectl get pods -n nms-reports
2) kubectl logs -f "podname" -n nms-reports
3) kubectl get pods -After

Nginx Namespace
----------------------
1) kubectl get pods -n ingress-nginx
2) kubectl logs -f ingress-nginx-controller-648cb64844-fp49b -n ingress-nginx

-- To deployment the service

1) kubectl rollout restart deployment nms-reports -n nms-reports

If not worked then build docker

cd /var/www/backend-services/nms_configurator/generation

kubectl delete pod -n ingress-nginx ingress-nginx-controller-c96d85d55-8tq2g

You might also like