Hosts are the most basic unit of resource within Rancher and is represented as any Linux server, virtual or physical, with the following minimum requirements.
* Any modern Linux distribution with a supported version of Docker.
* Must be able to communicate with the Rancher server via http or https through the pre-configured port (Default is 8080).
* Must be routable to any other hosts belonging to the same environment to leverage Rancher’s cross-host networking for Docker containers.
Rancher also supports Docker Machine and allows you to add your host via any of its supported drivers.
Field | Type | Create | Update | Default | Notes |
---|---|---|---|---|---|
amazonec2Config | amazonec2Config | Optional | Yes | - | |
authCertificateAuthority | string | Optional | Yes | - | |
authKey | string | Optional | Yes | - | |
azureConfig | azureConfig | Optional | Yes | - | |
description | string | Optional | Yes | - | |
digitaloceanConfig | digitaloceanConfig | Optional | Yes | - | |
dockerVersion | string | Optional | Yes | - | |
engineEnv | map[string] | Optional | Yes | - | |
engineInsecureRegistry | array[string] | Optional | Yes | - | |
engineInstallUrl | string | Optional | Yes | - | |
engineLabel | map[string] | Optional | Yes | - | |
engineOpt | map[string] | Optional | Yes | - | |
engineRegistryMirror | array[string] | Optional | Yes | - | |
engineStorageDriver | string | Optional | Yes | - | |
hostname | string | Yes | - | - | |
labels | map[string] | Optional | Yes | - | A map of key value pairs to be used as labels for the host |
localStorageMb | int | Optional | Yes | - | |
memory | int | Optional | Yes | - | |
milliCpu | int | Optional | Yes | - | |
name | string | Optional | Yes | - | |
packetConfig | packetConfig | Optional | Yes | - |
Field | Type | Notes |
---|---|---|
agentIpAddress | string | |
agentState | string | |
computeTotal | int | |
driver | string | |
id | int | The unique identifier for the host |
info | json | |
instanceIds | array[instance] | |
physicalHostId | physicalHost | |
publicEndpoints | array[publicEndpoint] |
Please read more about the common resource fields. These fields are read only and applicable to almost every resource. We have segregated them from the list above.
CreatePOST: /v2-beta/projects/${PROJECT_ID}/hosts
DeleteDELETE: /v2-beta/projects/${PROJECT_ID}/hosts/${ID}
UpdatePUT: /v2-beta/projects/${PROJECT_ID}/hosts/${ID}
activate
POST: /v2-beta/projects/${PROJECT_ID}/hosts/${ID}?action=activate
deactivate
POST: /v2-beta/projects/${PROJECT_ID}/hosts/${ID}?action=deactivate
dockersocket
POST: /v2-beta/projects/${PROJECT_ID}/hosts/${ID}?action=dockersocket
error
POST: /v2-beta/projects/${PROJECT_ID}/hosts/${ID}?action=error