This doc will walk through how to setup ingress for your Project using the Kubernetes API.
Setup Ingress to the Section Edge for HTTP workload
To setup ingress you will:
- Create the necessary Kubernetes Service object to expose the web server to the Internet.
- Use your DNS provider to direct traffic to your web server with a CNAME record.
Create a Service object
Create a yaml file, such as
- name: 80-8080
Use kubectl to create your ingress service
Deploy your service
kubectl apply -f my-service.yaml
The Service called
ingress-upstream causes the deployment of special ingress pods into your environment that route traffic into your app. Read more about the Section HTTP Ingress.
See your service running on Section
kubectl get services
You will see a new
ingress-upstream service, as in the following example.
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.xx.xx.xx <none> 443/TCP 6m55s
ingress-upstream ClusterIP 10.xx.xx.xx <none> 80/TCP 1s
See the pods running on Section's network
kubectl get pods -o wide
Note that you didn't set a location optization strategy, so Section will run your application with the default (2 locations).
- On the overview page of the Section Console, find and click your environment.
- Under Settings select Domains.
- Confirm that the domain name you provided when you created the environment is listed.
- Visit your DNS provider and create a CNAME record to point to Section as instructed on the Section Console Domains page.
- After some time you will be able to click the Verify button to confirm that DNS is engaged.
When you visit your hostname in a web browser, you'll see "Welcome to nginx!". This tells you that you application is successfully deployed!