정리하기
이 실습을 완료한 후 다음 명령을 실행하여 생성 한 파일 및 리소스를 정리할 수 있습니다.
unset AWS_SECRET_ACCESS_KEY
unset AWS_ACCESS_KEY_ID
kubectl delete namespace rbac-test
rm rbacuser_creds.sh
rm rbacuser-role.yaml
rm rbacuser-role-binding.yaml
aws iam delete-access-key --user-name=rbac-user --access-key-id=$(jq -r .AccessKey.AccessKeyId /tmp/create_output.json)
aws iam delete-user --user-name rbac-user
rm /tmp/create_output.json
다음으로 기존 aws-auth.yaml 파일을 오픈하여 기존 configMap에서 rbac-user 매핑을 제거 합니다.
data:
mapUsers: |
[]
그리고 ConfigMap을 적용하고 aws-auth.yaml 파일을 삭제 합니다.
kubectl apply -f aws-auth.yaml
rm aws-auth.yaml
RBAC 실습을 완료하였습니다.
Last updated
Was this helpful?