본문 바로가기

반응형

kubectl

[kubernetes] kubectl config 명령 - 2 쿠버네티스 kubectl config 설정 쿠버네티스 컨트롤러 서버(linux) kubectl config view $ kubectl config view apiVersion: v1 clusters: - cluster: certificate-authority-data: DATA+OMITTED server: https://127.0.0.1:6443 name: cluster.local contexts: - context: cluster: cluster.local user: kubernetes-admin name: kubernetes-admin@cluster.local current-context: kubernetes-admin@cluster.local kind: Config preferences: {} us.. 더보기
minikube를 이용한 kubernetes 클러스터 배포 minikube를 이용한 kubernetes 클러스터 배포 minikube - kubernetes cluster 구성 도구 1. KVM install https://help.ubuntu.com/community/KVM/Installation sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils sudo adduser `id -un` libvirt sudo adduser `id -un` kvm sudo adduser `id -un` libvirt-qemu sudo reboot systemctl is-active libvirtd 2. minikube install https://minikube.sigs.k8s.io/d.. 더보기
쿠버네티스에서 NGINX Ingress Controller를 설정하는 방법 쿠버네티스에서 NGINX Ingress Controller를 설정하는 방법 NGINX Ingress Controller를 설정하는 방법 NGINX Ingress Controller 배포 kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/cloud/deploy.yaml $ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/cloud/deploy.yaml namespace/ingress-nginx created serviceaccount/i.. 더보기
[Kubernetes] kubernetes localhost:8080 was refused 오류 kubernetes localhost:8080 was refused 오류 $ kubectl get pods The connection to the server localhost:8080 was refused - did you specify the right host or port? 환경 변수 등록 $ mkdir -p $HOME/.kube $ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config^C $ chown $(id -u):$(id -g) $HOME/.kube/config kubectl get pods 명령 실행 $ kubectl get pods NAME READY STATUS RESTARTS AGE nginx 1/1 Running 0 12h 더보기
[Kubernetes] kubernetes nginx 배포 테스트 -2 kubernetes nginx 배포 테스트 -2 nginx 컨테이너 실행 root@bk8sm1:~$ kubectl run nginx-app --image nginx --port=80 pod/nginx-app created ###kubectl get pods -o wide root@bk8sm1:~$ kubectl get pods --output=wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES nginx-app 1/1 Running 0 14m 10.244.2.2 bk8sn3 Serveivce 실행 root@bk8sm1:~$ kubectl expose pod nginx-app service/nginx-app exposed r.. 더보기
[Kubernetes] Kubernetes 설치 -1 Kubernetes(k8s) 설치 마스터(Master) 노드/워커(Worker) 노드 적용 호스트명 변경 $ hostnamectl set-hostname {호스트이름} 각 노드에 호스트 파일 등록 $ vim /etc/hosts # kubernetes cluster 10.255.255.111 bk8sm1 10.255.255.121 bk8sn1 10.255.255.122 bk8sn2 10.255.255.123 bk8sn3 컨테이너 런타임 설치(도커 설치) $ curl -fsSL https://get.docker.com -o get-docker.sh $ chmod +x get-docker.sh $ sh get-docker.sh $ usermod -aG docker $USER $ systemctl enable .. 더보기

728x90
반응형