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
{{ message }}
This repository was archived by the owner on Nov 30, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: containers/kubernetes-helm/README.md
+26-12Lines changed: 26 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
7
7
| Metadata | Value |
8
8
|----------|-------|
9
-
|*Contributors*| The VS Code team |
9
+
|*Contributors*| The VS Code team and Phetsinorath William |
10
10
|*Definition type*| Dockerfile |
11
11
|*Languages, platforms*| Any |
12
12
@@ -50,14 +50,26 @@ You can adapt your own existing development container Dockerfile to support this
50
50
"-v", "$HOME/.kube:/root/.kube-localhost"]
51
51
```
52
52
53
-
3. Update `.bashrc` to automatically swap out localhost for host.docker.internal in a containr copy of the Kubernetes config. From `.devcontainer/Dockerfile`:
53
+
3. Update `.bashrc` to automatically swap out localhost for host.docker.internal in a container copy of the Kubernetes config and optionally Minikube certificates if the volume is enabled. From `.devcontainer/Dockerfile`:
54
54
55
55
```Dockerfile
56
-
RUN echo 'if [ "$SYNC_LOCALHOST_KUBECONFIG" == "true" ]; then \
57
-
mkdir -p $HOME/.kube \
58
-
&& cp -r $HOME/.kube-localhost/* $HOME/.kube \
59
-
&& sed -i -e "s/localhost/host.docker.internal/g" $HOME/.kube/config; \
60
-
fi' >> $HOME/.bashrc
56
+
RUN echo '\n\
57
+
if [ "$SYNC_LOCALHOST_KUBECONFIG" == "true" ]; then\n\
58
+
mkdir -p $HOME/.kube\n\
59
+
cp -r $HOME/.kube-localhost/* $HOME/.kube\n\
60
+
sed -i -e "s/localhost/host.docker.internal/g" $HOME/.kube/config\n\
sed -i -r "s|(\s*client-key:\s).*|\\1$HOME\/.minikube\/client.key|g" $HOME/.kube/config\n\
70
+
fi\n\
71
+
fi' \
72
+
>> $HOME/.bashrc
61
73
```
62
74
63
75
5. Add a container specific user settings file that forces the Docker extension to be installed inside the container instead of locally. From `.devcontainer/Dockerfile`:
@@ -92,7 +104,7 @@ In addition, if you want to **disable sync'ing** local Kubernetes config into th
92
104
93
105
Follow the steps below for your operating system to use the definition.
94
106
95
-
### macOS / Windows
107
+
### macOS / Windows
96
108
97
109
1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started) to set up your machine.
98
110
@@ -119,10 +131,10 @@ Follow the steps below for your operating system to use the definition.
119
131
helm init
120
132
```
121
133
122
-
## Linux Setup
134
+
## Linux / Minikube Setup
123
135
124
136
1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started) to set up your machine.
125
-
137
+
126
138
2. Install [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) and [Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) on your local OS if you have not already.
127
139
128
140
3. Start Minikube as follows:
@@ -143,9 +155,11 @@ Follow the steps below for your operating system to use the definition.
143
155
144
156
6. After following step 2 or 3, the contents of the `.devcontainer` folder in your project can be adapted to meet your needs.
145
157
146
-
7. Finally, press <kbd>F1</kbd> and run **Remote-Containers: Reopen Folder in Container** to start using the definition.
158
+
7. Open `.devcontainer/devcontainer.json` and uncomment the minikube volume binding.
147
159
148
-
8. [Optional] If you want to use [Helm](https://helm.sh), open a VS Code terminal and run:
160
+
8. Finally, press <kbd>F1</kbd> and run **Remote-Containers: Reopen Folder in Container** to start using the definition.
161
+
162
+
9. [Optional] If you want to use [Helm](https://helm.sh), open a VS Code terminal and run:
0 commit comments