.yaml
format.
StreamNative Cloud objects are persistent entities in the StreamNative Cloud system. StreamNative Cloud uses these entities to represent the state of your organization. Specifically, they can describe:
snctl
CLI tool, the CLI tool makes the necessary StreamNative Cloud API calls for you.
myapp-1234
within the same organization.
spec
and the status
fields to govern the object’s configuration. The spec
field describes the desired characteristics of the object. The status
describes the current state of the object, supplied and updated by the StreamNative Cloud system and its components. The StreamNative Cloud continually and actively manages every object’s actual state.
spec
field that describes its desired state, and some basic information about the object (such as a name). When you use the StreamNative Cloud API to create an object, that API request must include that information as JSON in the request body. Most often, you provide the information to snctl
in a .yaml
file. snctl
converts the information to JSON when making the API request.
Here is an example of .yaml
file that shows the required fields and the spec
object for a cluster in StreamNative Cloud.
snctl apply
command in the snctl
CLI tool, passing the .yaml
file as an argument. Here is an example.
.yaml
file for the StreamNative Cloud object that you want to create, you need to set values for the following fields:
apiVersion
: specify the version of the StreamNative Cloud API used to create this object.kind
: specify the object to be created.metadata
: specify the data that helps uniquely identify the object, including a name
string and a namespace
string.spec
- specify the state you desire for the object.spec
field is different for every StreamNative Cloud object, and contains nested fields specific to that object.
snctl
CLI tool supports imperative commands to create and manage StreamNative Cloud objects. Imperative commands are simple, easy to learn and easy to remember. The imperative commands operate directly on live objects in an organization. You provide operations to the snctl
command as arguments or flags. This is the simplest way to get started or to run a one-off task in an organization. Because this technique operates directly on live objects, it provides no history of previous configurations.
The following example shows how to create a cluster object neo
using the imperative command.