Containers can be grouped together as logical collections called Services. To learn more about Services, check the article What are Services ?
Creating a fully functional Service is a two step process :
- Creating a Service
- Adding a Container to a Service
In this article, we will explore the steps to create a Service.
- One or more Containers
- Deployment Policy (Optional)
- Scaling Policy for Stateless Services (Optional)
- Network Policy (Optional)
- Volume Claim Policy for Stateful Services (Optional)
- Allocation Policy for Containers (Optional)
For requirements 2-6, if no new Policy is created, you can use the default Policies.
Steps to create a Service
1. In the left navigation panel, select Services and choose the Create Service option
2. In step 1 - General section. select the service Type as Stateless or Stateful
3. In Step 2 - Volume Labels, to create a Shared Folder, Choose the Label Type as Shared Folder, provide a Volume Label and Click Add. Note that the Shared Folder option is available for both Stateful and Stateless Services.
The Shared Folder label will be available as a target Storage at the time of adding a Container to the Service. One or more containers can mount their data directory to the same Shared Folder.
4. In case you choose Stateful Service type, in step 2 - Volume Labels, to add a persistent volume, Choose the Label Type as Persistent Volume, select one of the available Volume Policies and provide a Volume Label and Click Add.
The Persistent Volume label will be available as a target Storage at the time of adding a Container to the Service. One or more containers can mount their data directory to the same Persistent Volume.
5. In step 3 - Deployment Policy, choose the deployment policy according to the type of the Service - stateful or stateless.
6. In Step 4 - Scaling Policy, choose the Scaling policy. This step is applicable only for a Stateless Service
7. In step 5 - Network policy, choose the Network policy that defines the firewall restrictions for Inbound and Outbound requests to/from the Service.
8. In step 6 - Metadata, add optional metadata information either for the Service or for the Service proxy as a Key/Value Pair. Confirm all the Changes and click on Create to create a new Service.