본문 바로가기
네트워크 수업/쿠버네티스

쿠버네티스 23.05.23

by 6^6 2023. 5. 23.
728x90

■ 쿠버네티스설치.pdf
0.16MB

2023.05.23 - [네트워크 수업/Docker] - 쿠버네티스설치.pdf 23.05.23

 

 

 

 

 

/ 는 구분자이다.

^는 문자의 시작이다.

 

경로명을 써준다.

 

regex = Regular Expression

 

 

출처 : https://www.computerhope.com/unix/regex-quickref.htm

Metacharacter SequenceMeaningExample ExpressionExample Match

^ Start of string or line ^abc abc (appearing at start of string or line)
$ End of string, or end of line xyz$ xyz (appearing at end of string or line)
\b Word boundary ing\b matching (matches ing if it is at the end of a word)
\B NOT word-boundary \Bing\B stinger (matches ing if it is not at the beginning or end of the word)
\< Start of word \<when whenever (matches when only if it is at the beginning of a word)
\> End of word ever\> whenever (matches ever only if it is at the end of a word)

 

Metacharacter SequenceMeaningExample ExpressionExample Match

. Matches any single character except the newline character. ab.def abcdef, ab9def, ab=def
\s Matches a whitespace character (such as a space, a tab, a form feed, etc.) abcd\se abcd e, abcd(tab)e
\S NOT whitespace \S\S\s\S AB D, 99(tab)9
\w A word character. A word character is a letter, a number, or an underscore. This set of characters may also be represented by the regex character set [a-zA-Z0-9_] \w\{1,\}-\w\{1,}

(see quantifiers, below)
well-wishes, far-fetched
\W NOT a word character \w\W\{1,\}\w a,!-(?&;b, 9-5

 

 

 

Metacharacter SequenceMeaningExample ExpressionExample Match

* Zero or more of the preceding character ca*t cat, ct, caaaaaaaaaaaat
character\{m\} Exactly m occurrences of character f\{3\} fff
character\{m,n\} No fewer than m, but no more than n occurrences of character g\{4,6\} gggg, ggggg, gggggg
character\{m,\} At least m occurrences of character h\{2,\} hh, hhhhhhhh, and hhhhhhhhhhhhhh would match, but h would not

 

<대표적인것만 확인>

*은 뭐가 들어가도 상관없음  ex) c*t = ct = cbt = caaaat

?는 한개의 문자열을 뜻함  ex) t?ble = table = tble(x)

^는 그냥 문자로 받아들여라. ex) ^/abc = /abc자체가 문자. 

 

 

 

 

[root@localhost sunny]# setenforce 0
[root@localhost sunny]# cd /
[root@localhost /]# setenforce 0
[root@localhost /]# sed -i 's/^SELINUX=enforcing$/SELINUX=disabled/'  etc/selinux/config

==>SELINUX=enforcing 를 /SELINUX=disabled/ 로 바꿔라

 

[root@localhost /]# swapoff -a   ==> 스왑메모리 끄는 방법

 

[root@localhost /]# sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 

 

[root@localhost /]# vi /etc/fstab

현재 swap 메모리가 #주석처리 됐다.

 

fstab은 자동마운트가 되는 프로그램

 

 

[root@localhost /]# systemctl disable firewalld
[root@localhost /]# systemctl stop firewalld

[root@localhost /]# cat <<EOF>> /etc/modules-load.d/k8s.conf
> br netfilter
> EOF
[root@localhost /]# cat /etc/modules-load.d/k8s.conf
br netfilter

 

k8s 는 Kubernetes k8s

 

[root@localhost /]# cat <<EOF>> /etc/sysctl.d/k8s.conf

> net.bridge.bridge-nf-call-ip6tables = 1
> net.bridge.bridge-nf-call-iptables = 1
> EOF

 

[root@localhost /]# vi /etc/sysctl.d/k8s.conf

[root@localhost /]# sysctl --system

 

 

 

4page부터 따라하기

 

[root@localhost /]# hostnamectl set-hostname k8s-master
[root@localhost /]# cat /etc/hostname
k8s-master

 

[root@localhost /]# vi /etc/hosts

 

 

 

[root@localhost /]# systemctl stop NetworkManager

[root@localhost /]# systemctl start NetworkManager

 

 

[root@localhost /]# vi /etc/sysconfig/network-scripts/ifcfg-ens33

 

[root@localhost /]# hostnamectl set-hostname k8s-master

[root@localhost /]# init 6

 

unny@k8s-master ~]$ su
암호:
[root@k8s-master sunny]#   ==>이렇게 바뀜

[root@k8s-master sunny]#  ping 168.126.63.1

[root@k8s-master sunny]#  yum update -y

 

또는 vi /etc/yum.repos.d/kubernetes.repo 에서 밑에 복

[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg

 

[root@k8s-master sunny]#  curl -s https://get.docker.com | sudo sh

 

[root@k8s-master sunny]# systemctl enable docker
[root@k8s-master sunny]# systemctl start docker

 

 

[root@k8s-master sunny]# vi /etc/docker/daemon.json

 

 

[root@k8s-master sunny]# systemctl restart docker

 

오류나서 shutdown -r now

 

728x90

'네트워크 수업 > 쿠버네티스' 카테고리의 다른 글

쿠버네티스 23.06.02  (0) 2023.06.02
쿠버네티스 23.05.25  (0) 2023.05.25

댓글