Posts

Showing posts with the label nginx

Using Nginx on Docker

Image
Introduction Nginx is a popular open-source web server known for its superior performance compared to the Apache web server. Nginx supports various functionalities, including deploying an API gateway (reverse proxy) , load balancer , and email proxy . It was initially developed to build a web server capable of efficiently handling 10,000 concurrent connections with low memory usage. Run Nginx with Docker To use Nginx with Docker , simply execute the following command: docker run -dp 8080:80 nginx:alpine By default, Nginx uses port 80 , but you can map it to a different port if needed. Custom Nginx Configuration To customize the Nginx configuration, first, create a ` docker-compose.yml ` file with the following content: services : serviceName : image : nginx:alpine ports : - 8080:80 volumes : - ./default.conf:/etc/nginx/conf.d/default.conf - ./index.html:/usr/share/nginx/html/index.html In the ` volumes ` field, note that I have mapped two file

Kubernetes Pod Cheatsheet

Image
Introduction This article is here to guide you on using Pod  in Kubernetes . I'll give you some concepts and commands that Kubernetes often uses to handle Pod . Pod Introduction A Pod is the smallest deployable unit in Kubernetes . Here are some key points about Pods: Multiple Containers : A Pod can contain more than one container, and there's no limit to how many containers you can run inside a Pod. These containers are relatively tightly coupled and share resources such as disk. Shared Resources : All the containers inside a Pod are connected via localhost and share the same memory space. They also share storage (volumes), IP address, and configuration information. Unique IP Address : Each Pod gets a unique IP address. Ephemeral Nature : Pods are ephemeral in nature; they can be created, deleted, and updated. Prerequisites Before we begin, make sure you have the following: For Kubernetes systems, you can use minikube or have permissions to provision resources on cloud pro