brunch

You can make anything
by writing

C.S.Lewis

by Master Seo Jul 09. 2021

EKS 2탄-4. AWS EKS- 워드 프레스 설치

실습 2탄 =4/11

워드 프레스 설치해보자.



1

별도 터미널 

모니터링 , pod가 잘 안됨. 팬딩. 재시도.



watch -d kubectl get ns -A



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

# Create a namespace wordpress


kubectl create namespace 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



# Add the bitnami Helm Charts Repository

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

"bitnami" already exists with the same configuration, skipping



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)



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

"



다음 과정


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




<10>   AWS EKS 실습 2탄


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



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



감사합니다.





        

매거진의 이전글 EKS 2탄-3. EKS를 Helm으로 관리

작품 선택

키워드 선택 0 / 3 0

댓글여부

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