-
-
Save xrl/0f84c5f44d201b518ae52baafc00a513 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo docker info | |
sudo: unable to resolve host ip-10-43-91-51 | |
Containers: 20 | |
Running: 19 | |
Paused: 0 | |
Stopped: 1 | |
Images: 14 | |
Server Version: 1.12.6 | |
Storage Driver: overlay | |
Backing Filesystem: extfs | |
Logging Driver: json-file | |
Cgroup Driver: cgroupfs | |
Plugins: | |
Volume: local | |
Network: bridge null host overlay | |
Swarm: inactive | |
Runtimes: runc | |
Default Runtime: runc | |
Security Options: | |
Kernel Version: 4.4.78-k8s | |
Operating System: Debian GNU/Linux 8 (jessie) | |
OSType: linux | |
Architecture: x86_64 | |
CPUs: 16 | |
Total Memory: 62.91 GiB | |
Name: ip-10-43-91-51 | |
ID: BGSQ:QPEN:3IVI:UWGM:DQAO:NXZE:DWBV:XUDG:V2O4:LFNE:TGO5:GBRG | |
Docker Root Dir: /var/lib/docker | |
Debug Mode (client): false | |
Debug Mode (server): false | |
Registry: https://index.docker.io/v1/ | |
WARNING: No swap limit support | |
WARNING: No kernel memory limit support | |
Insecure Registries: | |
127.0.0.0/8 | |
$ sudo docker inspect k8s_es_es-logs-0_logs_7d58a547-ce49-11e7-8b98-022ae207d49c_0 | |
sudo: unable to resolve host ip-10-43-91-51 | |
[ | |
{ | |
"Id": "0da7614bec143c1a11b9784e8b044664861a34030bfd712964972ded44112c7b", | |
"Created": "2017-11-20T23:21:43.950743781Z", | |
"Path": "sleep", | |
"Args": [ | |
"300000" | |
], | |
"State": { | |
"Status": "running", | |
"Running": true, | |
"Paused": false, | |
"Restarting": false, | |
"OOMKilled": false, | |
"Dead": false, | |
"Pid": 53677, | |
"ExitCode": 0, | |
"Error": "", | |
"StartedAt": "2017-11-20T23:21:44.075198595Z", | |
"FinishedAt": "0001-01-01T00:00:00Z" | |
}, | |
"Image": "sha256:e3ce53616832d020e259333a8c90e5f485d21ce6d2712afa12d887c8cd51f74d", | |
"ResolvConfPath": "/var/lib/docker/containers/f4adff2187570165b55ecc2546add90b15e31680d6c69e21a099b8eaa3644826/resolv.conf", | |
"HostnamePath": "/var/lib/docker/containers/f4adff2187570165b55ecc2546add90b15e31680d6c69e21a099b8eaa3644826/hostname", | |
"HostsPath": "/var/lib/kubelet/pods/7d58a547-ce49-11e7-8b98-022ae207d49c/etc-hosts", | |
"LogPath": "/var/lib/docker/containers/0da7614bec143c1a11b9784e8b044664861a34030bfd712964972ded44112c7b/0da7614bec143c1a11b9784e8b044664861a34030bfd712964972ded44112c7b-json.log", | |
"Name": "/k8s_es_es-logs-0_logs_7d58a547-ce49-11e7-8b98-022ae207d49c_0", | |
"RestartCount": 0, | |
"Driver": "overlay", | |
"MountLabel": "", | |
"ProcessLabel": "", | |
"AppArmorProfile": "", | |
"ExecIDs": [ | |
"2c5aeb62d70ed105a5c28cc532eb9d3b72ff6647a71fa1324c6cf9776a77d37f", | |
"425094894a6b050cc290374d8ba487091b37506e34d168554fac559d52efcb05" | |
], | |
"HostConfig": { | |
"Binds": [ | |
"/var/lib/kubelet/pods/7d58a547-ce49-11e7-8b98-022ae207d49c/volumes/kubernetes.io~aws-ebs/pvc-60d5f856-ce38-11e7-8b98-022ae207d49c:/usr/share/elasticsearch/data", | |
"/var/lib/kubelet/pods/7d58a547-ce49-11e7-8b98-022ae207d49c/volumes/kubernetes.io~secret/es-discovery-token-shr7d:/var/run/secrets/kubernetes.io/serviceaccount:ro", | |
"/var/lib/kubelet/pods/7d58a547-ce49-11e7-8b98-022ae207d49c/etc-hosts:/etc/hosts", | |
"/var/lib/kubelet/pods/7d58a547-ce49-11e7-8b98-022ae207d49c/containers/es/d35f502e:/dev/termination-log" | |
], | |
"ContainerIDFile": "", | |
"LogConfig": { | |
"Type": "json-file", | |
"Config": { | |
"max-file": "5", | |
"max-size": "10m" | |
} | |
}, | |
"NetworkMode": "container:f4adff2187570165b55ecc2546add90b15e31680d6c69e21a099b8eaa3644826", | |
"PortBindings": null, | |
"RestartPolicy": { | |
"Name": "", | |
"MaximumRetryCount": 0 | |
}, | |
"AutoRemove": false, | |
"VolumeDriver": "", | |
"VolumesFrom": null, | |
"CapAdd": [ | |
"IPC_LOCK" | |
], | |
"CapDrop": null, | |
"Dns": null, | |
"DnsOptions": null, | |
"DnsSearch": null, | |
"ExtraHosts": null, | |
"GroupAdd": null, | |
"IpcMode": "container:f4adff2187570165b55ecc2546add90b15e31680d6c69e21a099b8eaa3644826", | |
"Cgroup": "", | |
"Links": null, | |
"OomScoreAdj": -998, | |
"PidMode": "", | |
"Privileged": true, | |
"PublishAllPorts": false, | |
"ReadonlyRootfs": false, | |
"SecurityOpt": [ | |
"seccomp=unconfined" | |
], | |
"UTSMode": "", | |
"UsernsMode": "", | |
"ShmSize": 67108864, | |
"Runtime": "runc", | |
"ConsoleSize": [ | |
0, | |
0 | |
], | |
"Isolation": "", | |
"CpuShares": 4096, | |
"Memory": 32212254720, | |
"CgroupParent": "/kubepods/pod7d58a547-ce49-11e7-8b98-022ae207d49c", | |
"BlkioWeight": 0, | |
"BlkioWeightDevice": null, | |
"BlkioDeviceReadBps": null, | |
"BlkioDeviceWriteBps": null, | |
"BlkioDeviceReadIOps": null, | |
"BlkioDeviceWriteIOps": null, | |
"CpuPeriod": 100000, | |
"CpuQuota": 400000, | |
"CpusetCpus": "", | |
"CpusetMems": "", | |
"Devices": [], | |
"DiskQuota": 0, | |
"KernelMemory": 0, | |
"MemoryReservation": 0, | |
"MemorySwap": -1, | |
"MemorySwappiness": -1, | |
"OomKillDisable": false, | |
"PidsLimit": 0, | |
"Ulimits": null, | |
"CpuCount": 0, | |
"CpuPercent": 0, | |
"IOMaximumIOps": 0, | |
"IOMaximumBandwidth": 0 | |
}, | |
"GraphDriver": { | |
"Name": "overlay", | |
"Data": { | |
"LowerDir": "/var/lib/docker/overlay/638122b8e1092c9aafb08beb042ad9b5bc26d3cfe1c33b782e676f036c5bbfba/root", | |
"MergedDir": "/var/lib/docker/overlay/5d5da506e2b35d232bb0664d48286a4bb4a2b6fa0dc7d5778af0c29490cedd47/merged", | |
"UpperDir": "/var/lib/docker/overlay/5d5da506e2b35d232bb0664d48286a4bb4a2b6fa0dc7d5778af0c29490cedd47/upper", | |
"WorkDir": "/var/lib/docker/overlay/5d5da506e2b35d232bb0664d48286a4bb4a2b6fa0dc7d5778af0c29490cedd47/work" | |
} | |
}, | |
"Mounts": [ | |
{ | |
"Source": "/var/lib/kubelet/pods/7d58a547-ce49-11e7-8b98-022ae207d49c/volumes/kubernetes.io~aws-ebs/pvc-60d5f856-ce38-11e7-8b98-022ae207d49c", | |
"Destination": "/usr/share/elasticsearch/data", | |
"Mode": "", | |
"RW": true, | |
"Propagation": "rprivate" | |
}, | |
{ | |
"Source": "/var/lib/kubelet/pods/7d58a547-ce49-11e7-8b98-022ae207d49c/volumes/kubernetes.io~secret/es-discovery-token-shr7d", | |
"Destination": "/var/run/secrets/kubernetes.io/serviceaccount", | |
"Mode": "ro", | |
"RW": false, | |
"Propagation": "rprivate" | |
}, | |
{ | |
"Source": "/var/lib/kubelet/pods/7d58a547-ce49-11e7-8b98-022ae207d49c/etc-hosts", | |
"Destination": "/etc/hosts", | |
"Mode": "", | |
"RW": true, | |
"Propagation": "rprivate" | |
}, | |
{ | |
"Source": "/var/lib/kubelet/pods/7d58a547-ce49-11e7-8b98-022ae207d49c/containers/es/d35f502e", | |
"Destination": "/dev/termination-log", | |
"Mode": "", | |
"RW": true, | |
"Propagation": "rprivate" | |
} | |
], | |
"Config": { | |
"Hostname": "es-logs-0", | |
"Domainname": "", | |
"User": "0", | |
"AttachStdin": false, | |
"AttachStdout": false, | |
"AttachStderr": false, | |
"ExposedPorts": { | |
"9200/tcp": {}, | |
"9300/tcp": {} | |
}, | |
"Tty": false, | |
"OpenStdin": false, | |
"StdinOnce": false, | |
"Env": [ | |
"TAKE_FILE_OWNERSHIP=true", | |
"ES_JAVA_OPTS=-Xms20g -Xmx20g", | |
"DISCOVERY_SERVICE=logs", | |
"NAMESPACE=logs", | |
"LOGS_PORT_9300_TCP=tcp://100.64.180.3:9300", | |
"LOGS_PORT_9300_TCP_PORT=9300", | |
"KUBERNETES_PORT_443_TCP_PORT=443", | |
"KUBERNETES_PORT_443_TCP_ADDR=100.64.0.1", | |
"LOGS_SERVICE_PORT=9200", | |
"LOGS_PORT=tcp://100.64.180.3:9200", | |
"LOGS_PORT_9200_TCP_ADDR=100.64.180.3", | |
"KUBERNETES_PORT=tcp://100.64.0.1:443", | |
"LOGS_SERVICE_HOST=100.64.180.3", | |
"LOGS_PORT_9200_TCP=tcp://100.64.180.3:9200", | |
"LOGS_PORT_9200_TCP_PROTO=tcp", | |
"KUBERNETES_PORT_443_TCP_PROTO=tcp", | |
"LOGS_SERVICE_PORT_TRANSPORT=9300", | |
"LOGS_PORT_9300_TCP_PROTO=tcp", | |
"LOGS_PORT_9300_TCP_ADDR=100.64.180.3", | |
"KUBERNETES_SERVICE_HOST=100.64.0.1", | |
"KUBERNETES_SERVICE_PORT=443", | |
"KUBERNETES_SERVICE_PORT_HTTPS=443", | |
"KUBERNETES_PORT_443_TCP=tcp://100.64.0.1:443", | |
"LOGS_SERVICE_PORT_DB=9200", | |
"LOGS_PORT_9200_TCP_PORT=9200", | |
"PATH=/usr/share/elasticsearch/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", | |
"ELASTIC_CONTAINER=true", | |
"JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk" | |
], | |
"Cmd": null, | |
"Image": "455567940957.dkr.ecr.us-west-2.amazonaws.com/elasticsearch@sha256:bd20b68294112129c9435d29a72fc3b6f05484f3a197e5d9606d090f6e93d49c", | |
"Volumes": null, | |
"WorkingDir": "/usr/share/elasticsearch", | |
"Entrypoint": [ | |
"sleep", | |
"300000" | |
], | |
"OnBuild": null, | |
"Labels": { | |
"annotation.io.kubernetes.container.hash": "cec4d100", | |
"annotation.io.kubernetes.container.ports": "[{\"name\":\"restapi\",\"containerPort\":9200,\"protocol\":\"TCP\"},{\"name\":\"transport\",\"containerPort\":9300,\"protocol\":\"TCP\"}]", | |
"annotation.io.kubernetes.container.restartCount": "0", | |
"annotation.io.kubernetes.container.terminationMessagePath": "/dev/termination-log", | |
"annotation.io.kubernetes.container.terminationMessagePolicy": "File", | |
"annotation.io.kubernetes.pod.terminationGracePeriod": "30", | |
"build-date": "20170911", | |
"io.kubernetes.container.logpath": "/var/log/pods/7d58a547-ce49-11e7-8b98-022ae207d49c/es_0.log", | |
"io.kubernetes.container.name": "es", | |
"io.kubernetes.docker.type": "container", | |
"io.kubernetes.pod.name": "es-logs-0", | |
"io.kubernetes.pod.namespace": "logs", | |
"io.kubernetes.pod.uid": "7d58a547-ce49-11e7-8b98-022ae207d49c", | |
"io.kubernetes.sandbox.id": "f4adff2187570165b55ecc2546add90b15e31680d6c69e21a099b8eaa3644826", | |
"license": "GPLv2", | |
"maintainer": "Elastic Docker Team \u003cdocker@elastic.co\u003e", | |
"name": "CentOS Base Image", | |
"vendor": "CentOS" | |
} | |
}, | |
"NetworkSettings": { | |
"Bridge": "", | |
"SandboxID": "", | |
"HairpinMode": false, | |
"LinkLocalIPv6Address": "", | |
"LinkLocalIPv6PrefixLen": 0, | |
"Ports": null, | |
"SandboxKey": "", | |
"SecondaryIPAddresses": null, | |
"SecondaryIPv6Addresses": null, | |
"EndpointID": "", | |
"Gateway": "", | |
"GlobalIPv6Address": "", | |
"GlobalIPv6PrefixLen": 0, | |
"IPAddress": "", | |
"IPPrefixLen": 0, | |
"IPv6Gateway": "", | |
"MacAddress": "", | |
"Networks": null | |
} | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apps/v1beta1 | |
kind: StatefulSet | |
metadata: | |
name: es-logs | |
namespace: logs | |
spec: | |
serviceName: es-logs | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: es | |
role: es-node | |
cluster: logs | |
itsecmon.purpose: elasticsearch | |
spec: | |
serviceAccountName: es-discovery | |
containers: | |
- name: es | |
imagePullPolicy: Always | |
image: 1234.dkr.ecr.us-west-2.amazonaws.com/elasticsearch:6.0.0 | |
resources: | |
requests: | |
memory: "30Gi" | |
cpu: "4" | |
limits: | |
memory: "30Gi" | |
cpu: "4" | |
ports: | |
- containerPort: 9200 | |
name: restapi | |
protocol: TCP | |
- containerPort: 9300 | |
name: transport | |
protocol: TCP | |
volumeMounts: | |
- name: datadir | |
mountPath: /usr/share/elasticsearch/data | |
env: | |
- name: TAKE_FILE_OWNERSHIP | |
value: "true" | |
- name: ES_JAVA_OPTS | |
value: "-Xms20g -Xmx20g" | |
- name: DISCOVERY_SERVICE | |
value: logs | |
- name: "NAMESPACE" | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.namespace | |
command: ["sleep", "300000"] | |
# args: ["bin/elasticsearch", "-Ecluster.name=logs", "-Enode.master=true", "-Enode.data=true", "-Ebootstrap.memory_lock=true", "-Ediscovery.zen.minimum_master_nodes=1"] | |
securityContext: | |
privileged: true | |
# capabilities: | |
# add: ["IPC_LOCK"] | |
# runAsUser: 1000 | |
# fsGroup: 1000 | |
volumeClaimTemplates: | |
- metadata: | |
name: datadir | |
spec: | |
accessModes: [ "ReadWriteOnce" ] | |
storageClassName: aws-us-west-2a-gp2 | |
resources: | |
requests: | |
storage: 40Gi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment