@@ -40,22 +40,25 @@ Before you begin, ensure you have the following:
40
40
41
41
### Clone the repo
42
42
Clone your forked repository to your local machine:
43
- ```bash
44
- git clone https://github.com/<your-github-username>/code2cloud-python-flask-webserver.git
45
- ```
43
+ ``` bash
44
+ git clone https://github.com/< your-github-username> /code2cloud-python-flask-webserver.git
45
+ ```
46
46
47
47
### Change the Version Number in version.py
48
48
Change the directory to the cloned repository:
49
- ```bash
50
- cd code2cloud-python-flask-webserver
51
- ```
49
+
50
+
51
+ ``` console
52
+ cd code2cloud-python-flask-webserver
53
+ ```
52
54
53
55
Open the `version.py` file and update the version number:
54
- ```python
55
- version = "0.0.10" # Update to a new version number
56
- ```
56
+ ``` python
57
+ version = " 0.0.10" # Update to a new version number
58
+ ```
57
59
58
60
### Push the changes to the Repository
61
+
59
62
```bash
60
63
git add version.py
61
64
git commit -m "Update version number to 0.0.10"
@@ -69,31 +72,31 @@ Before you begin, ensure you have the following:
69
72
70
73
### Deploy the Application with Manifests Files
71
74
Apply the Kubernetes manifests to create the namespace, deployment, and service:
72
- ```bash
73
- kubectl apply -f manifests/deployment.yaml
74
- ```
75
+ ``` bash
76
+ kubectl apply -f manifests/deployment.yaml
77
+ ```
75
78
76
79
### Create a Secret in the K8s Cluster to Pull the Image from GHCR
77
80
78
81
Use the PAT token to create a Docker registry secret:
79
- ```bash
80
- kubectl create secret docker-registry ghcr-io-creds \
81
- --docker-server=ghcr.io \
82
- --docker-username=<github_handle> \
83
- --docker-password=<your_pat_token> \
84
- --docker-email=<email>
85
- ```
82
+ ``` bash
83
+ kubectl create secret docker-registry ghcr-io-creds \
84
+ --docker-server=ghcr.io \
85
+ --docker-username=< github_handle> \
86
+ --docker-password=< your_pat_token> \
87
+ --docker-email=< email>
88
+ ```
86
89
87
90
### Verify the Deployment
88
91
Check the status of the pods to ensure they are running:
89
- ```bash
90
- kubectl get pods -n code2cloud
91
- ```
92
+ ``` bash
93
+ kubectl get pods -n code2cloud
94
+ ```
92
95
93
96
Verify the service is created and accessible:
94
- ```bash
95
- kubectl get svc -n code2cloud
96
- ```
97
+ ``` bash
98
+ kubectl get svc -n code2cloud
99
+ ```
97
100
98
101
### Access the Application
99
102
Use the external IP provided by the LoadBalancer service to access the application in your browser.
0 commit comments