我一直在尝试将 opendistro es 映像推出到节点。我已经将 yaml 脚本放在一起,可以做到这一点,但是在进入 pod 并尝试卷曲 localhost 并点击 elasticsearch API 时,我收到错误:
curl: (7) Failed to connect to ::1: Cannot assign request address
Run Code Online (Sandbox Code Playgroud)
这是下面的 yaml 脚本,也许我做了一些明显错误的事情
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: es-opendistro
labels:
service: es-opendistro
spec:
serviceName: es-opendisro
replicas: 1
selector:
matchLabels:
name: es-opendistro
template:
metadata:
labels:
service: es-opendistro
name: es-opendistro
spec:
nodeSelector:
name: es-opendistro
initContainers:
- name: init-sysctl
image: busybox:1.30
command: ["sysctl", "-w", "vm.max_map_count=262144"]
securityContext:
privileged: true
containers:
- name: es-opendistro
image: CM-DEPLOYER:5000/elasticsearch-opendistro:0.10.0
env:
- name: ES_JAVA_OPTS …Run Code Online (Sandbox Code Playgroud)