Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

  1. provides instance-level key-value sets for the Helm Charts values file(s).

Terminate AS Instance Resource

The termination of an individual AS instance resource.

REST Interfaces

  • POST .../as_instances/{asInstanceId}/terminate (TerminateAsRequest)
  • 202 Accepted ()
  • Send asLcmOperationOccurrenceNotification (STARTING/PROCESSING/COMPLETED)
  • 200 OK (AsLcmOpOcc:operationState=COMPLETED)

TerminateAsRequest

Attribute NameData TypeCardinalityDescription
terminationTypeEnum1
  • FORCEFUL
  • GRACEFUL
gracefulTerminationTimeoutInteger0..1The unit is seconds
additionalParamsKeyValuePairs0..1Additional input parameters for the Terminate AS process (this is a pace holder to hold any additional parameters for the orchestrator, such as CNFM)

Delete AS Instance Resource

...

Attribute NameData TypeCardinalityDescription
asInstanceIdIdentifier1

Identifier of the AS instance

asInstanceNameString0..1Name of the AS instance. This attribute can be modified with the PATCH (i.e., update) method.
asInstanceDescriptionString0..1

Human-readable description of the AS instance.

This attribute can be modified with the PATCH method.

asdIdIdentifier1

Identifier of the ASD on which the CNF instance is based.

asVersionVersion1

Specifies the version of the Application.

asSchemaVersion

Version

1

Specifies the version of the ASD’s schema. The value is copied from the ASD.

asProvider

String

1

Provider of the AS instance. The value is copied from the ASD.

asApplicationName

String

1

Name to identify the AS instance. The value is copied from the ASD.

asApplicationVersion

String

1

Specifies the version of the Application. The value is copied from the ASD.

asApplicationInfoNameString0..1

Human readable name for the Application service instance. The value is copied from the ASD.

asInfoDescriptionString0..1

Human readable description of the AS instance. The value is copied from the ASD.

asdExtCpd

datatype.ExtCpd0..N

Contains the externally exposed “instance-level” connection points of the application.

enhancedClusterCapabilitiesdatatype. enhancedClusterCapabilities0..N

Contains a list of  “instance-level” expected capabilities of the target Kubernetes cluster to aid placement of the application service on a suitable cluster.

deploymentItemsDeploymentItems1..N

Contains Deployment artifacts with “instance-level” lifecylceparmaeterKeyValues

instantiationState

String of Enum;

  • NON_INSTANTIATION,
  • INSTANTIATED
0..1

Indicates the current Instantiation State

instantiationAsInfo

datatype.instantiationAsInfo

0..1

Information specific to an instantiated AS Instance, such as STARTED, STOPPED

metadataobject (key value pair)0..1

represents a list of “instance-level” metadata key-value pairs

extensionsobject (key value pair)0..1

Additional AS-specific “instance-level” attributes that affect the lifecycle management of this AS instance

_linksdatatype._links0..1

Links to resources related to this resource, such as self, indicators, instantiate, terminate and operate URIs

asDeploymentNameString0..1

name of the deployment in the namespace (e.g., helm release name)

Note: once an app is deployed, the asDeploymentName is required

targetClusterString0..1target cluster name


datatype.instantiationAsInfo

...

GET /api/v1/nodes

with parameters

...

  • labelSelector
  • findSelector
  • resourceVersion

...


Based on the node label (which is not unique), get a node list. To narrow it further, use the additional findSelector parameter. 

...

  • kubectl get pods -o=name
  • kubectl get pods -o=name |  sed "s/^.\{4\}//" | grep <release name>
  • kubectl get pods --no-headers -o custom-columns=":metadata.name" | grep <release name>
  • kubectl get pod -A | grep <release name> | awk '{print $2}'.    // find a POD by release name
  • kubectl get --no-headers=true pods -o name | awk -F "/" '{print $2}'

Get PoD / container status

  • kubectl get pods <pod name> --no-headers -o custom-columns=":status.phase".     // check if pod is running or not
  • kubectl get pod <pod name>  --output="jsonpath={.status.containerStatuses[*].ready}".  // check if the container is ready, which is true


Others

  • kubectl get ns -A
  • kubectl get pods - n <namespace>
  • kubectl get pod -o=custom-columns=NAME:.metadata.name,NODE:.spec.nodeName
  • kubectl get pod -o=custom-columns=NAME:.metadata.name,NODE:.spec.nodeName | awk '{print $2}'.                                         // get the node name
  • kubectl get pod -o=custom-columns=NAME:.metadata.name,NODE:.spec.nodeName | grep <release name>.                               // get the pod and node names for release name
  • kubectl get pod -o=custom-columns=NAME:.metadata.name,NODE:.spec.nodeName | grep <release name> | awk '{print $2}'.  // get the node name for release name
  • kubectl describe pods <pod name>       // get a pod description
  • kubectl describe pods <pod name> | grep 'Container ID'.    // get container id(s) from a pod
  • kubectl get pod <pod name>  -o="custom-columns=NAME:.metadata.name,INIT-CONTAINERS:.spec.initContainers[*].name,CONTAINERS:.spec.containers[*].name".   // get pod, init-container and containers
  • kubectl get pods <pod name>  -o jsonpath='{range .spec.containers[*]}{.name}{"\n"}{end}'.   // get container name(s) from the pod name
  • kubectl exec -it <pod name> -c <container name> bash.  // access pod

...