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
You may also need stern and kubectx or [kubectxwin](https://github.com/thomasliddledba/kubectxwin).
14
+
You may also need stern and kubectx.
12
15
13
-
Windows TIP: Install tools via Chocolatey.
14
-
> **Alternative**: Save all `.exe` files in same location and rename them to be `skaffold.exe` etc.
15
-
> Run command ```rundll32.exe sysdm.cpl,EditEnvironmentVariables``` and add the path for executable files to **System variable PATH**.
16
-
17
-
### Setting up minikube (Linux)
16
+
### Setting up minikube
18
17
19
18
Start minikube:
20
19
@@ -28,17 +27,86 @@ Enable the ingress addon:
28
27
minikube addons enable ingress
29
28
```
30
29
31
-
### Setting up minikube (Windows)
30
+
### Starting the development cluster
31
+
32
+
In the root of the repo, run: `bin/dev`. This skript will start the development cluster with skaffold. The initial build will take a while but after that is done, everything should be relatively quick.
33
+
34
+
You can monitor the process by running `watch kubectl get pods` in another terminal.
35
+
36
+
TIP: For multiple terminal windows, we recommend you to use a terminal with split window support for convenience. For Linux, one good option is [Tilix](https://gnunn1.github.io/tilix-web/).
37
+
38
+
### Setting up a local domain name
39
+
40
+
After skaffold has started up, we need to add a local domain name so that we can access the ingress of the cluster.
41
+
42
+
List ingresses with kubectl and grab the IP address for `project-331-ingress`:
43
+
44
+
```sh
45
+
kubectl get ingress
46
+
```
47
+
48
+
Next, add a hosts entry for the IP address you got from the previous command:
49
+
50
+
```
51
+
ip-from-previous-command project-331.local
52
+
```
53
+
54
+
You can find the hosts file in Linux from `/etc/hosts`.
55
+
56
+
After that, you should be able to access the application by going to `http://project-331.local/` in your web browser. Take a look at `kubernetes/ingress.yml` to see how requests are routed to different services.
57
+
58
+
59
+
## Setting up development environment on Windows 10
60
+
61
+
### Development tools
62
+
63
+
Install the following tools with [chocolatey](https://docs.chocolatey.org/en-us/choco/setup):
- During installation of Cygwin you will be prompted for additional packages, these are needed: `postgres-client` & `procps-ng`
74
+
3. Open Windows Terminal and press the small arrow down and open Settings (as JSON), add the following:
75
+
```
76
+
profiles: {
77
+
...
78
+
list: [
79
+
...
80
+
{
81
+
"guid": "{00000000-0000-0000-0000-000000000001}",
82
+
"commandline": "C:/cygwin64/Cygwin.bat",
83
+
"icon": "C:/cygwin64/Cygwin-Terminal.ico",
84
+
"hidden": false,
85
+
"name": "Cygwin"
86
+
}
87
+
]
88
+
}
89
+
```
90
+
91
+
### Skaffold
92
+
93
+
1. Download [Skaffold](https://skaffold.dev/docs/install/) latest [stable release](https://storage.googleapis.com/skaffold/releases/latest/skaffold-windows-amd64.exe) for Windows and save it under `C:\Binary`.
94
+
2. Rename the executable to `skaffold.exe`.
95
+
3. Start `cmd` or `Powershell` as administrator and run: `rundll32.exe sysdm.cpl,EditEnvironmentVariables`
96
+
4. Under **System variables** click the **Path** row and click button `Edit...`, click button `New` and type in the row: `C:\Binary\`.
97
+
5. Check with `Git Bash` or `Cygwin` that Skaffold is in correct folder by running `which skaffold`.
98
+
99
+
### Setting up minikube (HyperV/Virtualbox)
32
100
33
101
Using Windows 10 Pro, you can enable HyperV with these [instructions](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v).
34
-
If you don't have Windows 10 Pro, you can install [Docker Desktop for Windows](https://docs.docker.com/docker-for-windows/install/) and change driver to ```--vm-driver docker``` for Minikube commands.
35
102
36
-
*TODO: Figure out if you need to create the default vSwitch in HyperV or does Minikube take care of that*
103
+
**NB!** If you don't have access to HyperV, you can install [Virtualbox](https://www.virtualbox.org/) and change driver to `--vm-driver=virtualbox` for Minikube commands.
104
+
> NOTE: You may need the `--no-vtx-check` parameter for `minikube start` when using Virtualbox, please try to run the command without it.
In the root of the repo, run: `bin/dev`. This skript will start the development cluster with skaffold. The initial build will take a while but after that is done, everything should be relatively quick.
52
-
53
-
You can monitor the process by running `watch kubectl get pods` in another terminal.
119
+
Start Windows Terminal (Make sure you are using *Cygwin* terminal)
54
120
55
-
TIP: For multiple terminal windows, we recommend you to use a terminal with split window support for convenience. For Linux, one good option is [Tilix](https://gnunn1.github.io/tilix-web/) and if you're using Windows, you can use the new [Windows terminal](https://github.com/microsoft/terminal) (Documentation here: https://docs.microsoft.com/en-us/windows/terminal/panes).
121
+
In the root of the repo, run: `bin/dev`. This skript will start the development cluster with skaffold. The initial build will take a while but after that is done, everything should be relatively quick.
56
122
123
+
You can monitor the process by running `watch kubectl get pods` in another *Cygwin* terminal.
57
124
58
125
### Setting up a local domain name
59
126
@@ -71,7 +138,6 @@ Next, add a hosts entry for the IP address you got from the previous command:
71
138
ip-from-previous-command project-331.local
72
139
```
73
140
74
-
You can find the hosts file in Linux from `/etc/hosts`.
75
-
You can find the hosts file in Windows from `C:\Windows\System32\drivers\etc`.
141
+
You can find the hosts file in Windows from `C:\Windows\System32\drivers\etc` (edit as administrator).
76
142
77
143
After that, you should be able to access the application by going to `http://project-331.local/` in your web browser. Take a look at `kubernetes/ingress.yml` to see how requests are routed to different services.
0 commit comments