728x90
mkdir workspace && cd $_
kubectl get node
kubectl run nginx-pod --image=nginx # pending > ContainerCreating > Running
kubectl get pod
그런데 여기서 ip 이슈로 에러가 뜨는 경우가 생김..
# kubectl delete -f https://raw.githubusercontent.com/projectcalico/calico/v3.27.0/manifests/calico.yaml
# yum install -y wget
# wget https://raw.githubusercontent.com/projectcalico/calico/v3.27.0/manifests/calico.yaml
# vi calico.yaml
imagePullSecrets:
- name: dockersecret
# kubectl apply -f calico.yaml
# kubectl create secret docker-registry dockersecret --docker-username=<dockerhub id> --docker-password=<dockerhub password> --docker-email=<email>
# kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.27.0/manifests/calico.yaml
# kubectl get pod --all-namespaces
kubectl get secrets
kubectl edit sa default
다시 해보자!!
kubectl run nginx-pod --image=nginx
kubectl get pod
kubectl get service
kubectl expose pod nginx-pod --name clusterip --type=ClusterIP --port 80
kubectl expose pod nginx-pod --name nodeport --type=NodePort --port 80
kubectl expose pod nginx-pod --name loadbalancer --type=LoadBalancer --external-ip 192.168.0.29 --port 80
728x90
'Kubernetes' 카테고리의 다른 글
Kubernetes-volume (1) | 2024.02.19 |
---|---|
쿠버네티스- MetalLB (0) | 2024.02.19 |
쿠버네티스 3 (0) | 2024.02.05 |
쿠버네티스 2 (0) | 2024.02.02 |
쿠버네티스란? (0) | 2024.02.01 |