Command
| API version | kobblestone.io/v1alpha1 |
|---|---|
| Kind | Command |
| Scope | Namespaced |
| kubectl | kubectl get commands |
A Command object executes an arbitrary command on a Minecraft server via RCON.
Commands are executed directly by the operator with zero overhead. Therefore, no additional resources such as Job/Pod will be allocated.
Target servers must have RCON enabled for commands to work (spec.rcon.disabled=null|false).
The response of commands can be observed via status.response.
spec
Raw command string that should be executed against the target via RCON.
passwordSecretRefobjectOptional reference to a custom Secret holding the RCON password.
Automatically implied when targeting a Server object.
targetRefobjectReference to a target where the command should be executed.
The following targets are supported:
Server: Command targets aServerobject.Service: Command target a customServiceand port that exposes RCON.
4 fields
apiVersionstringApiVersion of the target object.
kindstringKind of the target object.
Supported values:
ServerService
Default is Server.
Name of the target object.
timeoutMillisecondsint32Timeout for the command in milliseconds. Default is no timeout.
The timeout is applied individually for opening the connection and executing the command.
When a command times out, status.phase will be Failed and status.failureReason will be Timeout.
- Minimum: 1
trafficPolicystringPolicy that determines how RCON traffic flows to the target.
Default is Cluster.
Cluster means that traffic will always be routed inside the cluster to known ClusterIPs.
External means that traffic may be routed to external IPs, such as LoadBalancer IPs. This may be useful when direct connectivity from the operator to the target is not given. WARNING: RCON connections are unencrypted and should never be routed through the internet. Ensure your LoadBalancer is not exposed to the internet.
- One of:
Cluster,External
status
conditions[]objectConditions of the Command.
6 fields
lastTransitionTimestring- Format:
date-time
messagestringobservedGenerationint64reasonstringstatusstringtypestringexecutedAtstringTimestamp when the command was executed or execution was attempted.
- Format:
date-time
failureReasonstringReason of failure when command execution failed.
messagestringMessage explaining the current state of the Command.
phasestringCurrent phase of the command.
Values:
Pending: Command execution is pending.Completed: Command executed successfully.Failed: Command execution failed.
- One of:
Pending,Completed,Failed
responsestringRaw response of the server after executing the command.