github.com/rkt/rkt@v1.30.1-0.20200224141603-171c416fac02/Documentation/subcommands/api-service.md (about) 1 # rkt api-service 2 3 ## Overview 4 5 The API service lists and introspects pods and images. 6 The API service is implemented with [gRPC][grpc]. 7 The API service is designed to run without root privileges, and currently provides a read-only interface. 8 The API service is optional for running pods, the start/stop/crash of the API service won't affect any pods or images. 9 10  11 12 ## Running the API service 13 14 The API service listens for gRPC requests on the address and port specified by the `--listen` option. 15 The default is to listen on the loopback interface on port number `15441`, equivalent to invoking `rkt api-service --listen=localhost:15441`. 16 Specify the address `0.0.0.0` to listen on all interfaces. 17 18 Typically, the API service will be run via a unit file similar to the one included in the [dist directory][rkt-api]. 19 20 ## Using the API service 21 22 The interfaces are defined in the [protobuf here][api_proto]. 23 Here is a small [Go program][client-example] that illustrates how to use the API service. 24 25 ## Options 26 27 | Flag | Default | Options | Description | 28 | --- | --- | --- | --- | 29 | `--listen` | `localhost:15441` | An address to listen on | Address to listen for client API requests | 30 31 ## Global options 32 33 See the table with [global options in general commands documentation][global-options]. 34 35 36 [api_proto]: https://github.com/rkt/rkt/blob/master/api/v1alpha/api.proto 37 [client-example]: https://github.com/rkt/rkt/blob/master/api/v1alpha/client_example.go 38 [global-options]: ../commands.md#global-options 39 [grpc]: https://www.grpc.io/ 40 [rkt-api]: https://github.com/rkt/rkt/blob/master/dist/init/systemd/rkt-api.service