NGINX Modern Apps > Class 11 - F5 NGINX Plus Ingress Controller as an API Gateway for Kubernetes > Task 02: Create https://jobs.local/get-job API endpoint Source | Edit on
Task 02: Create https://jobs.local/get-job API endpoint¶
Change to the task_02 directory.
Create a TLS certificate and key for the https://jobs.local/get-job api endpoint we plan to create.

Create a K8s secret to store the TLS certificate and key.

Confirm the K8s secret was created.

All Kubernetes admins are familiar with native K8s resources such as ‘pods’, ‘deployments’, and ‘services’, but what is a ‘virtualserver’? A virtualserver is a K8s Custom Resource Definition (CRD) used to configure NGINX ingress. Custom Resource Definitions extend the Kubernetes system to support new resource types. We will create the virtualserver named “my-virtualserver” here for the first time. The properties for “my-virtualserver” are in the VirtualServer.yaml manifest. We will build all of the advanced API gateway functionality by layering them one-by-one, each time applying a modified, more capable version of the VirtualServer.yaml manifest that we start with here.
Confirm the status of the virtualserver ‘my-virtualserver’ you just created.
Our environment now looks like this:
Outside K8s Cluster | Inside K8s Cluster |
---|---|
https://jobs.local/get-job | http://eclectic-jobs:3000/ |
https://jobs.local/add-job | http://eclectic-jobs:3000/add-job |
From the URL bar of the web browser, connect to the new API endpoint: https://jobs.local/get-job
Skip the Warning: Potential Security Risk Ahead self-signed certificated warning by clicking on [Advanced…] => [Accept the Risk and Continue].

The API endpoint https://jobs.local/get-job
is ready to receive API GET requests.
The API endpoint https://jobs.local/add-job
is ready to receive API POST requests.
