Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated instance API request/response example

...

Code Block
languagejs
{
    "cloud-region": "krd",
    "profile-name": "p1",
	"rb-name":"test-rbdef",
	"rb-version":"v1",
	"override-parameters": {
		"optionalDictOfParameters": "andTheirValues, like",
		"global.name": "dummy-name"
	},
    "labels": {
        "optionalLabelForInternalK8spluginInstancesMetadata": "dummy-value"
	}
}

NOTE: Make sure that the namespace is already created before instantiation.
See

Jira Legacy
serverSystem Jira
serverId4733707d-2057-3a0f-ae5e-4fd8aff50176
keyMULTICLOUD-462
for more details.

Instantiate the profile with the ID provided above

...

languagebash
titleCommand to Instantiate a Profile

...

Instantiate the profile with the ID provided above

Code Block
languagebash
titleCommand to Instantiate a Profile
curl -d @create_rbinstance.json http://NODE_IP:30280/api/multicloud-k8s/v1/v1/instance

...

Code Block
languagejs
{
  "id": "ZKMTSaxv",
  "rb-name": "mongo",
  "rb-version": "v1",
  "profile-name": "profile1",
  "cloud-region": "kud",
  "namespace": "testns",
  "resources": [
    {
      "GVK": {ID_GENERATED_BY_K8SPLUGIN",
  "namespace": "NAMESPACE_WHERE_INSTANCE_HAS_BEEN_DEPLOYED_AS_DERIVED_FROM_PROFILE",
  "request": {
    "rb-name": "test-rbdef",
    "rb-version": "v1",
    "profile-name": "p1",
    "cloud-region": "krd",
  	"override-parameters": {
		"optionalDictOfParameters": "andTheirValues, like",
		"global.name": "dummy-name"
	},
    "labels": {
        "optionalLabelForInternalK8spluginInstancesMetadata": "dummy-value"
	},
  }
  "resources": [
        {                                                                                                                                                                                                          
            "GVK": {                                                                                                                                                                                               
                "Group": "",                                                                                                                                                                                       
                "Kind": "ConfigMap",                                                                                                                                                                               
                "Version": "v1"                                                                                                                                                                                    
            },                                                                                                                                                                                                     
            "Name": "test-cm"                                                                                                                                                                               
        },                                                                                                                                                                                                         
        {                                                                                                                                                                                                          
            "GVK": {                                                                                                                                                                                               
                "Group": "",                                                                                                                                                                                       
                "Kind": "Service",                                                                                                                                                                                 
                "Version": "v1"                                                                                                                                                                                    
            },                                                                                                                                                                                                     
            "Name": "test-svc"                                                                                                                                                                            
        },                                                                                                                                            "Group": "",         "Version": "v1",         "Kind": "Service"       },       "Name": "mongo"     },     {       "GVK": {       
 "Group": "",      {
  "Version": "v1",         "KindGVK": "Service"{
         },       "NameGroup": "mongo-readapps",
    },     {       "GVKKind": {"Deployment",
        "Group": "apps",         "Version": "v1beta1v1",
          "Kind": "StatefulSet" },
     },       "Name": "profile1test-mongodep"
        }
  ]
}

Delete Instantiated Kubernetes resources

...

The id  field from the returned JSON can be used to GET the resources created in the previous step

This executes a Delete operation using the Kubernetes API.

Code Block
languagebash
titleCommand to GET a resource
curl -X GET http://NODE_IP:30280/api/multicloud-k8s/v1/v1/instance/ZKMTSaxv

Output of this call conforms to the same schema and contains (currently) same information as instantiation response (described above)

LIST all Instantiated Kubernetes resources

...