brunch

You can make anything
by writing

C.S.Lewis

by Master Seo Jul 09. 2021

EKS 2탄-4. AWS EKS- 워드 프레스-4/11

실습 2탄 =4/11

<1> 워드 프레스 - 워드 프레스 설치 - 오류 , 구버전으로 오류.  다른 pod로 대체 작성 예정 - PASS



<1> 워드 프레스 - 워드 프레스 설치 - 오류 , 구버전으로 오류.  다른 pod로 대체 작성 예정 - PASS




1

터미널 2

모니터링 


watch -d kubectl get ns


네임스페이스 추가 확인 , pod가 잘 안됨. 팬딩 확인.



2

별도의 네임 스페이스 만들어 사용하자


# Create a namespace wordpress


kubectl create namespace wordpress-cwi



kubens 


kubens wordpress-cwi




# 네임 스페이스 확인

kubectl  get ns

NAME                STATUS   AGE

amazon-cloudwatch   Active   82m

default             Active   45h

kube-node-lease     Active   45h

kube-public         Active   45h

kube-system         Active   45h

wordpress-cwi       Active   173m



watch -d kubectl get ns,deploy,rs,svc,pods





# Add the bitnami Helm Charts Repository - 이미 실행 


helm repo add bitnami https://charts.bitnami.com/bitnami




2

배포


# Deploy WordPress in its own namespace , 워드 프레스 네임 스페이스에 배포.


helm -n wordpress-cwi install understood-zebu bitnami/wordpress


(5분 걸림)


NAME: understood-zebu

LAST DEPLOYED: Fri Jul  9 04:48:36 2021

NAMESPACE: wordpress-cwi

STATUS: deployed

REVISION: 1

NOTES:

** Please be patient while the chart is being deployed **

Your WordPress site can be accessed through the following DNS name from within your cluster:

    understood-zebu-wordpress.wordpress-cwi.svc.cluster.local (port 80)

To access your WordPress site from outside the cluster follow the steps below:

1. Get the WordPress URL by running these commands:

  NOTE: It may take a few minutes for the LoadBalancer IP to be available.

        Watch the status with: 'kubectl get svc --namespace wordpress-cwi -w understood-zebu-wordpress'

   export SERVICE_IP=$(kubectl get svc --namespace wordpress-cwi understood-zebu-wordpress --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")

   echo "WordPress URL: http://$SERVICE_IP/"

   echo "WordPress Admin URL: http://$SERVICE_IP/admin"

2. Open a browser and access WordPress using the obtained URL.

3. Login with the following credentials below to see your blog:

  echo Username: user




# 패스워드를 확인하자.


  echo Password: $(kubectl get secret --namespace wordpress-cwi understood-zebu-wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)



# 구버전으로 페이지가 작동하지 않음.-  PASS


# pop가 pending 상태 




참고

helm search repo wordpress





3

배포 상태  추적


kubectl -n wordpress-cwi rollout status deployment understood-zebu-wordpress


deployment "understood-zebu-wordpress" successfully rolled out



4

Word press 사이트 URL  확인?


export SERVICE_URL=$(kubectl get svc -n wordpress-cwi understood-zebu-wordpress --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")


echo "Public URL: http://$SERVICE_URL/"



http://ad0cef4e08b2b41c1a31faf884ff7b79-412213092.ap-northeast-2.elb.amazonaws.com/



5

접속



6

admin 접속?


export ADMIN_URL="http://$SERVICE_URL/admin"


export ADMIN_PASSWORD=$(kubectl get secret --namespace wordpress-cwi understood-zebu-wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)



7

echo "Admin URL: http://$SERVICE_URL/admin


Username: user

Password: $ADMIN_PASSWORD

"





8

삭제


1deployment.apps/understood-zebu-wordpress



k delete deployment.apps/understood-zebu-wordpress




#   AWS EKS 실습 2탄


https://brunch.co.kr/@topasvga/1882



https://brunch.co.kr/@topasvga/1679



다음 과정


https://brunch.co.kr/@topasvga/1696

     

브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari