inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

대세는 쿠버네티스 (초급~중급편)

Kubernetes Cluster 설치

join.sh의 내용이 없으며 localhost:8080 was refused 에러가 뜹니다.

907

JE Sim

작성한 질문수 1

1

Kubernetes Cluster 설치 v1.22를보고 설치 하였는데,

설치 후 master node에 join하는 과정에서 join.sh파일은 생서되었으나 내용물이 없고, kubectl명령어를 써보면

The connection to the server localhost:8080 was refused - did you specify the right host or port?

 

에러가 뜹니다. 신속하게 해결 하고 싶은데 답변 부탁드립니다.

 

참고로 vagrant up 실행시 아래와 같은 에러가 발생됩니다

 

==> k8s-master: Running provisioner: shell...

k8s-master: Running: inline script

k8s-master: I0329 11:04:29.670608 14429 version.go:255] remote version is much newer: v1.26.3; falling back to: stable-1.22

k8s-master: [init] Using Kubernetes version: v1.22.17

k8s-master: [preflight] Running pre-flight checks

k8s-master: [preflight] WARNING: Couldn't create the interface used for talking to the container runtime: docker is required for container runtime: exec: "docker": executable file not found in $PATH

k8s-master: error execution phase preflight: [preflight] Some fatal errors occurred:

k8s-master: [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist

k8s-master: [ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1

k8s-master: [preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...

k8s-master: To see the stack trace of this error execute with --v=5 or higher

k8s-master: failed to load admin kubeconfig: open /root/.kube/config: no such file or directory

k8s-master: To see the stack trace of this error execute with --v=5 or higher

k8s-master: cp: cannot stat ‘/etc/kubernetes/admin.conf’: No such file or directory

k8s-master: chown: cannot access ‘/root/.kube/config’: No such file or directory

 

docker kubernetes

답변 1

0

일프로

안녕하세요. 다운받은 Vagrantfile 스크립트를 열어서 내용을 보면 아래와 같은 내용이 있는데,

# Iptables 커널 옵션 활성화
cat <<EOF >  /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
sysctl --system

# permissive 모드로 SELinux 설정(효과적으로 비활성화)

 

아래 내용 추가 부분 넣어서 다시 해보시겠어요? Iptables 커널 옵션 활성화 부분이 설치 중에 잘 안 먹힐 경우 나올 수 있는 에러입니다.

# Iptables 커널 옵션 활성화
cat <<EOF >  /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
sysctl --system

################# 내용 추가 ####################
modprobe br_netfilter
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
################################################

# permissive 모드로 SELinux 설정(효과적으로 비활성화)

yml 작성하다가 에러 발생해서 문의 드립니다.

0

39

2

설치수업중에 질문드립니다.

1

57

2

기초다지기 설치 문의드립니다.

1

105

4

HPA 부분 Auto Scaler 설치하는 링크가 없습니다!!

1

65

3

클러스터 초기화 및 팟 네트워크 세팅시 문제가 있습니다

1

101

1

환경 구성에 있어서 질문드립니다

1

92

2

configMap 파일생성

1

77

2

dashboard에서 pod 생성이 되지 않습니다.

1

77

2

nodePort 서비스 접근 Client sent an HTTP request to an HTTPS server

1

74

2

대시보드 화면이 달라요 ㅠㅠ

1

60

2

대시보드 접근이 안됩니다!

1

98

2

Ingress실습에 난관이 있습니다

1

67

2

master 노드에서 ssh 로그인 창이 안뜨는 오류

1

82

3

안녕하세요 일프로님 궁금한 거 있습니다

0

50

1

7강 마지막 대시 보드 출력에 관한 문제

1

57

2

Could not resolve host: externalname1; Unknown error

0

60

2

Failed to create pod sandbox

1

90

2

자료실을 못 찾겠습니다 ㅜ ㅡ ㅜ

0

57

2

0/3 nodes are available

1

57

2

Back-off restarting fail~~

1

100

4

쿠버네티스 대시보드 접속 문제

1

89

2

설치관련 질문입니다

1

116

2

raw.githubusercontent.com 에 대한 질문

1

138

2

worker노드 추가시에

1

68

1