mirror of
https://github.com/hwdsl2/docker-ipsec-vpn-server.git
synced 2026-04-26 10:05:48 +03:00
[GH-ISSUE #286] Getting 'CrashLoopBackOff' from Kubernetes pod #265
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sichokie on GitHub (Mar 27, 2022).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/286
So sorry for not marking down the checklist. But here's what I've got:
Also if needed, this is my .yaml file : https://pastebin.com/wuGiXnb6
Did anyone face this problem? Thank you!
@hwdsl2 commented on GitHub (Mar 29, 2022):
@sichokie Hello! This Docker image contains a script
run.shthat first checks that it is running inside a container (e.g. Docker, Podman) [1].Your logs indicate that this check failed when you run it in Kubernetes. This could mean that this Docker image is not yet compatible with Kubernetes. For now, you can try commenting out the relevant lines [1] and build your own Docker image from source [2].
If you have suggestions on how to make that check work under Kubernetes, let us know.
[1]
github.com/hwdsl2/docker-ipsec-vpn-server@a73c1f1467/run.sh (L43-L45)[2] https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage.md#build-from-source-code
@hwdsl2 commented on GitHub (Mar 29, 2022):
@sichokie Fixed in
df3284f. You can try the latest Docker image.@sichokie commented on GitHub (Mar 29, 2022):
It's finally working, but we need to make sure that the container is privileged within the Kubernetes.
Thank you so much, it saves me a lot!
@sichokie commented on GitHub (Mar 29, 2022):
Hi @hwdsl2 Sorry for bothering again. The image is working as you and I mentioned before. When I try to get the pod log, the IP, user, password and IPsec PSK is shown as well.
But when I try to connect from my local machine, it didn't connect, the IP Address shown in from a node within my cluster, I can ping the IP address, but it doesn't connect.
I'm following a guide from https://shinychang.net/blog/deploy-ipsec-vpn-server-on-kubernetes/ and I'm using the same config as he does.
Can you please help? Thank you!
@hwdsl2 commented on GitHub (Mar 29, 2022):
@sichokie Which VPN mode are you using (IPsec/L2TP, IPsec/XAuth or IKEv2)? For IKEv2 mode, you must use the VPN server's public IP to connect, instead of its local (private) IP. On the other hand, if you want to use the VPN server's local (private) IP to connect, you'll need to remove IKEv2 and set it up again using custom options. See [1] for more details.
[1] https://github.com/hwdsl2/docker-ipsec-vpn-server#configure-and-use-ikev2-vpn
@hwdsl2 commented on GitHub (Mar 29, 2022):
@sichokie Looking at your configuration again, IKEv2 mode may not be enabled in your
vpn-ipsec.yaml. In this case, it could be due to network or firewall issues between your local machine and your Kubernetes cluster, which prevents VPN connection requests from reaching UDP ports 500 and 4500 on the VPN server node.