Configure Static IP Nginx ingress Kubernetes - Linux Guru

You have a web server running on kubernetes and expose it on a domain name and you need the external ip of an application to be a static ip that does not change.
  • Reserve a new static IP address for INGRESS.
  • Reserve a static external IP address named my-website-ip by run following command from your machine.
$ gcloud compute addresses create my-website-ip --global
here now we have reserved the static ip for the ingress, lets create ingress controller for the application and attached the static ip.
  • lets create ingress file and describe the service name and static IP.
$ ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
  name: yourappname-ingress
  annotations: "my-website-ip"
    serviceName: mywebsite-service
    servicePort: 80
Apply the ingress file and check your app, It should be access by static IP and you should point that IP to your domain name.


Popular posts from this blog

Another instance of Certbot is already running - Solved - Linux guru

Install Apache Using Ansible Playbooks

Setup password less SSH on linux

Create aws s3 bucket using cli

Secure nginx with Let's Encrypt on Ubuntu 18.04