You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+76-1Lines changed: 76 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,4 +72,79 @@ docker run -p 8080:8080 fns-api
72
72
To stop:
73
73
```bash
74
74
docker stop fns-api
75
-
```
75
+
```
76
+
77
+
## Docs: GCloud Deployment Configuration
78
+
79
+
For detailed step-by-step instructions on configuring Google Cloud (GCloud) aspects such as Kubernetes Cluster creation, Artifact Registry, Service Account creation, and IAM policy binding, please refer to the following video tutorial:
80
+
81
+
[GCloud Configuration Video Tutorial](https://www.youtube.com/watch?v=KQUKDiBz3IA)
82
+
83
+
This video will guide you through the necessary configurations in the Google Cloud Console to prepare your project for Kubernetes deployments using GitHub Actions.
84
+
85
+
**Key Reminders from the Video &for Successful Deployment:**
86
+
87
+
***Keep Track of Docker Image Name, Project ID, and Kubernetes Cluster Name:** Note these down during the video configuration, as you will need them in subsequent steps and for your GitHub Actions workflow.
88
+
***Service Account Email:** Ensure you create a Service Account as shown in the video and securely download and store the JSON key file. You'll also need to note the Service Account's email address.
89
+
90
+
**Post-Configuration Steps (using `gcloud` and `kubectl`):**
91
+
92
+
1. **Create a Kubernetes Cluster in GCloud:**
93
+
94
+
* Navigate to the Kubernetes Engine section in your Google Cloud Console.
95
+
* Click **Create Cluster**.
96
+
* Choose a cluster name (e.g., `flex-net-sim-cluster`). **Remember this name.**
97
+
* Select a region for your cluster (e.g., `us-central1`).
98
+
* For the purpose of this guide, you can use the default settings for node pools, networking, and other configurations, or adjust them based on your specific needs.
99
+
* Click **Create** to create the cluster. It will take a few minutes for the cluster to be provisioned.
100
+
101
+
2. **Set IAM Policy Binding (using `gcloud`):**
102
+
103
+
Replace `<YOUR-GOOGLE-PROJECT-ID>` and `<SERVICE_ACCOUNT_EMAIL>` with your actual Google Cloud Project ID and the Service Account Email you noted down.
Replace `<CLUSTER-NAME>` and `<YOUR-GOOGLE-PROJECT-ID>` with your Kubernetes Cluster Name and Google Cloud Project ID. Ensure the region is set to `us-central1`.
The command will fetch the cluster credentials and configure `kubectl` to use them. You should see output similar to:
118
+
119
+
```
120
+
Fetching cluster endpoint and auth data.
121
+
kubeconfig entry generated for<CLUSTER-NAME>.
122
+
```
123
+
124
+
4. **Verify `kubectl` Configuration and Service Deployment (using `kubectl`):**
125
+
126
+
After the command is successful, verify your `kubectl` configuration and check for the `fns-api-service`:
127
+
128
+
```bash
129
+
kubectl get service fns-api-service
130
+
```
131
+
132
+
If the service is correctly deployed (after your GitHub Actions workflow runs), it should display information about your service, including the `EXTERNAL-IP`.
133
+
134
+
You should see output similar to this (the `EXTERNAL-IP` will likely be different):
Use the `curl`command with the `EXTERNAL-IP` you obtained from the previous step to test your deployed API. Replace `<YOUR-EXTERNAL-IP>` with the actual `EXTERNAL-IP`.
**Remember**: These GCloud configurations, along with the repository's `gke-cd.yml` GitHub Actions workflow and correctly configured GitHub secrets, are essential for successful automated deployment of your FlexNetSim-API application to Google Cloud Kubernetes Engine.
0 commit comments