inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

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

Kubernetes Cluster 설치

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

914

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 설정(효과적으로 비활성화)

이거 지금 부터 들어도 괜찮을까요 ?? 시간이 꽤지난거같은데 .. 뭐 최신하고 아에 안맞을까요 .

0

39

1

pod kubetm/app 에서 image를 갑자기 못가져 오는거 같습니다.

1

46

2

3. Node Schedule 중 pod-5가 마스터 노드에 배치됩니다.

1

52

2

volume hostpath의 강의에 관해 질문이 있습니다.

1

41

2

컨트롤러

1

76

2

네임스페이스+파드

0

77

3

강의영상 과 자료

0

87

2

IP 가 어딨나요?

1

75

2

설치 문제 없는건가요?

1

61

1

xshell 접속오류

1

78

2

[15. ConfigMap, Secret - 실습] Env (File) 실습 시 문의사항

1

93

2

Node Schedule 실습 시 pod3 생성 시 메모리 요청량이 올라가지 않는 사항

1

72

1

Guest OS

1

78

2

kubeTM Blog는 없어진건가요????

1

103

2

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

0

101

2

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

1

130

2

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

1

181

4

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

1

104

3

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

1

138

1

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

1

139

2

configMap 파일생성

1

118

2

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

1

140

2

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

1

132

2

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

1

103

2