Kubernetes YAML is a human-readable text-based format for specifying configuration-type information. Using YAML for K8s definitions provides a number of benefits to users.
Convenience: Users no longer have to add all of their parameters to the command line.
Maintenance: YAML files can be added to source control, so that changes can be tracked.
Flexibility: Users can create much more complex structures using YAML relative to command line
You can manage the lifecycle of K8s YAML based workloads using the Web Console or RCTL CLI or REST APIs. We strongly recommend that customers automate this either
- By integrating RCTL with your existing CI system based automation pipeline, OR
- By leveraging the integrated GitOps capability.
You can create Kubernetes YAML based workloads using the Web Console or the RCTL CLI or REST APIs.
- Login into the Web Console
- Click on New Workload
- Provide a name, select package type as "K8s YAML"
- Select if you would like to "upload" the artifacts or you would like the Controller to "pull" it directly from a configured repository.
- Select the namespace where you wish to deploy the workload
Option A: Pull from Repository¶
This approach requires the user to first select the type of the Git repository. Then, in the next step
- Select the repository from the dropdown list
- Select the branch/revision in the Git repo (in this example, master)
- Specify the path for the YAML file (in this example, nginxyaml/nginx.yaml)
Option B: Upload K8s YAML¶
For this approach, the user needs to upload the "K8s yaml" file to the Controller. After uploading the file, users are allowed to "download" the configured K8s yaml file if they wish to view it.
- Selecting the placement policy for the workload
- Publish the workload
To have the managed prometheus addon scrape pod metrics, add the following annotations to the pods with these parameters
metadata: annotations: prometheus.io/scrape: "true" prometheus.io/path: /metrics prometheus.io/port: "8080" spec:
Adjust the prometheus.io/path based on the URL from where the pod serves metrics. Set prometheus.io/port to the port from where the pod serves metrics. The values for prometheus.io/scrape and prometheus.io/port must be enclosed within double quotes
The collected metrics in Prometheus will be retained for 3 hours
At anytime during or after deployment, users can view the status and other information about their workload's K8s resources by clicking on Debug.