Template orkestrasi mendefinisikan dan mendeskripsikan sekumpulan resource kluster Kubernetes secara deklaratif, yang menentukan cara aplikasi dijalankan atau dikonfigurasi. Anda dapat menggunakan templat ini untuk mengotomatiskan penerapan dan manajemen kluster resource, seperti Pod, Service, Deployment, ConfigMap, dan PersistentVolume. Anda dapat memanggil operasi CreateTemplate untuk membuat template orkestrasi.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:CreateTemplate |
create |
*全部资源
|
None | None |
Sintaks permintaan
POST /templates HTTP/1.1
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
Parameter badan permintaan. |
|
| name |
string |
Yes |
Nama templat. Aturan penamaan: Nama harus memiliki panjang 1 hingga 63 karakter dan dapat berisi angka, karakter Tionghoa, huruf, dan tanda hubung (-). Nama tidak boleh diawali dengan tanda hubung (-). |
service-account-template |
| template |
string |
Yes |
Konten templat dalam format YAML. |
apiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: test-sa |
| tags |
string |
No |
Tag template orkestrasi. |
test |
| description |
string |
No |
Deskripsi template orkestrasi. |
this is test |
| template_type |
string |
No |
Tipe templat.
Mengatur parameter ini ke |
kubernetes |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Badan respons. |
||
| template_id |
string |
ID template orkestrasi. |
ba1fe77b-b01e-4640-b77e-8f1b80****** |
Contoh
Respons sukses
JSONformat
{
"template_id": "ba1fe77b-b01e-4640-b77e-8f1b80******"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.