-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added solution #46
base: main
Are you sure you want to change the base?
added solution #46
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your hard work on this Pull Request! While you've made great progress, there are a few critical issues that need to be addressed before we can approve it:
-
File Naming Errors: There are typos in the filenames for
secret.yml
andconfigMap.yml
. Please ensure that these filenames are corrected to match the actual files. This is crucial for the proper functioning of your deployment scripts. -
Pod Name in Command: The command
kubectl exec -it mysql-o -n mysql -- bash
contains an incorrect pod name. Please replacemysql-o
with the actual pod name to ensure the command executes successfully. -
Environment Variables: Ensure that the environment variables
DB_HOST
,DB_NAME
,DB_PASSWORD
, andDB_USER
are correctly set in your environment to avoid any database connection issues.
Once these issues are resolved, your solution will be in great shape! Keep up the good work, and feel free to reach out if you have any questions. 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
INSTRUCTION.md
Outdated
|
||
# to check if volumes are mounted | ||
1. Get pod name by `kubectl get pods -n mysql` | ||
2. Connect to pod by `kubectl exec -it mysql-o -n mysql -- bash` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command 'kubectl exec -it mysql-o -n mysql -- bash' seems to have a placeholder or incorrect pod name. Replace 'mysql-o' with the actual pod name obtained from the previous step.
kubectl apply -f st-configMap.yml | ||
|
||
echo "Applying Secrets..." | ||
kubectl apply -f secret.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo in the filename 'secret.yml'. Ensure the file name matches the actual file.
"HOST": os.environ.get("DB_HOST",""), | ||
"PORT": 3306, | ||
"NAME": os.environ.get("DB_NAME",""), | ||
"PASSWORD": os.environ.get("DB_PASSWORD",""), | ||
"USER": os.environ.get("DB_USER",""), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the environment variables DB_HOST, DB_NAME, DB_PASSWORD, and DB_USER are correctly set in your environment to avoid database connection issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on addressing the majority of the issues in your deployment configuration! 🎉 Your solution is well-structured, and you've made significant progress in aligning with the task requirements. However, there are a few critical issues that need attention:
-
File References: Several files such as
hpa.yml
,nodeport.yml
,clusterIp.yml
,pvc.yml
,pv.yml
,secret.yml
,configMap.yml
, andnamespace.yml
are referenced but not present. Ensure these files are correctly named and included in your directory, or update your script to reference the correct files. -
Dynamic Pod Name: The command to connect to the pod uses a hardcoded pod name
mysql-0
. Consider using a dynamic approach to retrieve the pod name to avoid potential issues if the naming convention changes.
Despite these issues, the decision is to APPROVE your pull request to help you move forward with your learning. Please review the comments and address these critical issues in future iterations to enhance the functionality and robustness of your code. Keep up the good work and continue improving! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
|
||
# to check if volumes are mounted | ||
1. Get pod name by `kubectl get pods -n mysql` | ||
2. Connect to pod by `kubectl exec -it mysql-0 -n mysql -- bash` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command kubectl exec -it mysql-0 -n mysql -- bash
uses a hardcoded pod name mysql-0
. This might not be accurate if the pod name changes. Consider using a command like kubectl get pods -n mysql -o jsonpath='{.items[0].metadata.name}'
to dynamically retrieve the pod name.
set -x # Print commands for debugging | ||
|
||
echo "Creating Namespaces..." | ||
kubectl apply -f namespace.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file namespace.yml
is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.
kubectl apply -f namespace-mysql.yml | ||
|
||
echo "Applying ConfigMaps..." | ||
kubectl apply -f configMap.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file configMap.yml
is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.
kubectl apply -f st-configMap.yml | ||
|
||
echo "Applying Secrets..." | ||
kubectl apply -f secret.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file secret.yml
is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.
kubectl apply -f st-secret.yml | ||
|
||
echo "Creating PersistentVolume..." | ||
kubectl apply -f pv.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file pv.yml
is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.
kubectl apply -f pv.yml | ||
|
||
echo "Creating PersistentVolumeClaim..." | ||
kubectl apply -f pvc.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file pvc.yml
is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.
kubectl apply -f pvc.yml | ||
|
||
echo "Creating ClusterIP Service..." | ||
kubectl apply -f clusterIp.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file clusterIp.yml
is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.
kubectl apply -f clusterIp.yml | ||
|
||
echo "Creating NodePort Service..." | ||
kubectl apply -f nodeport.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file nodeport.yml
is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.
kubectl apply -f st-service.yml | ||
|
||
echo "Applying Horizontal Pod Autoscaler (HPA)..." | ||
kubectl apply -f hpa.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file hpa.yml
is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.
No description provided.