Skip to content

support DNS for VPN client#111

Merged
sshi100 merged 4 commits intomainfrom
zero-103-VPN-DNS
Sep 29, 2020
Merged

support DNS for VPN client#111
sshi100 merged 4 commits intomainfrom
zero-103-VPN-DNS

Conversation

@sshi100
Copy link
Copy Markdown
Contributor

@sshi100 sshi100 commented Sep 28, 2020

No description provided.

# get name
echo -n "Enter your name: "
read name
echo -n "Enter your name: " && read name
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's print the name of the cluster before this so they know which context they are using. Otherwise they don't really know where they are adding the user to, and I don't think we explicitly tell them to change their kube context.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

[[ -z "$vpc_cidr" ]] && vpc_cidr = "10.10.0.0/16"

# get DB server
K8S_DBSERVER=database.${NAMESPACE}.svc.cluster.local
Copy link
Copy Markdown
Contributor

@bmonkman bmonkman Sep 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's take this out. It's extra complexity just to show an example comment. Let's just leave the comment as an example like <rds mysql hostname>

echo
echo "When it is running you should be able to access internal resources, e.g. mysql -h 10.10.10.123"
echo "When it is running you should be able to access internal resources, eg. database server:"
echo " with Kubernetes cluster DNS, run:"
Copy link
Copy Markdown
Contributor

@bmonkman bmonkman Sep 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not show both of these, it will just confuse people who don't have enough context. We can just have an example like <aws rds hostname>
If anything, you could mention that you can connect to things inside both the VPC and the kubernetes cluster.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, good

fi
EXEC="kubectl -n vpn exec -it $POD -- /bin/bash -c"

function k8s_exec() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sshi100 sshi100 merged commit 9581ca1 into main Sep 29, 2020
@sshi100 sshi100 deleted the zero-103-VPN-DNS branch September 29, 2020 17:46
bmonkman added a commit that referenced this pull request Oct 10, 2020
* support DNS for VPN client

* fix hardcode

* enhancement on display etc.

* Update add-vpn-user.sh

Co-authored-by: Bill Monkman <[email protected]>
@sshi100 sshi100 self-assigned this Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants