You have a running cluster with at least 1 node.
1. Deploying a Workload
You're ready to create your first Kubernetes workload. A workload is an object that includes pods along with other files and info needed to deploy your application.
For this workload, you'll be deploying the application Rancher Hello-World.
- Click ☰ > Cluster Management.
- Go to the cluster that you created and click Explore.
- Click Workload.
- Click Create.
- Click Deployment.
- Enter a Name for your workload.
- From the Docker Image field, enter
rancher/hello-world. This field is case-sensitive.
- Click Add Port and enter
80in the Private Container Port field. Adding a port enables access to the application inside and outside of the cluster. For more information, see Services.
- Click Create.
- Your workload is deployed. This process might take a few minutes to complete.
- When your workload completes deployment, it's assigned a state of Active. You can view this status from the project's Workloads page.
2. Expose The Application Via An Ingress
Now that the application is up and running, it needs to be exposed so that other services can connect.
Click ☰ > Cluster Management.
Go to the cluster that you created and click Explore.
Click Service Discovery > Ingresses.
When choosing Namespace, ensure it is the same as the one used when you created your deployment. Otherwise, your deployment will not be available when you attempt to select Target Service, as in Step 8 below.
Enter a Name, such as hello.
Specify your Path, such as
In the Target Service field, drop down the list and choose the name that you set for your service.
In the Port field, drop down the list and select
Click Create at the bottom right.
Result: The application is assigned a
sslip.io address and exposed. It may take a minute or two to populate.
View Your Application
From the Deployments page, find the Endpoints column for your deployment and click on an endpoint. The endpoints available will depend on how you configured the port you added to your deployment. For endpoints where you do not see a randomly assigned port, append the path you specified when creating the ingress to the IP address. For example, if your endpoint looks like
https://xxx.xxx.xxx.xxx change it to
Your application will open in a separate window.
Congratulations! You have successfully deployed a workload exposed via an ingress.
When you're done using your sandbox, destroy the Rancher Server and your cluster. See one of the following: