Deploy a single-service application¶
This topic describes how to use both the MKE web UI and the CLI to deploy an
NGINX web server and make it accessible on port
To deploy a single-service application using the MKE web UI:
Log in to the MKE web UI.
Navigate to Swarm > Services and click Create a service.
In the Service Name field, enter
In the Image Name field, enter
Navigate to Network > Ports and click Publish Port.
In the Target port field, enter
In the Protocol field, enter
In the Publish mode field, enter
In the Published port field, enter
Click Confirm to map the ports for the NGINX service.
Specify the service image and ports.
Click Create to deploy the service into the MKE cluster.
To view the default NGINX page through the MKE web UI:
Navigate to Swarm > Services.
Click Published Endpoints.
Click the link to open a new tab with the default NGINX home page.
To deploy a single service using the CLI:
Verify that you have downloaded and configured the client bundle.
Deploy the single-service application:
docker service create --name nginx \ --publish mode=ingress,target=80,published=8000 \ --label com.docker.ucp.access.owner=<your-username> \ nginx
View the default NGINX page by visiting