Skip to content

Commit 716ebe3

Browse files
aks bastion: allow using public FQDN
When users have public FQDN on their private cluster and want to use normal DNS resolution for bastion, we should let them. Signed-off-by: Steve Kuznetsov <[email protected]>
1 parent 3785797 commit 716ebe3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/aks-preview/azext_aks_preview/_help.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4188,6 +4188,9 @@
41884188
- name: --admin
41894189
type: bool
41904190
short-summary: Use the cluster admin credentials to connect to the bastion.
4191+
- name: --public-fqdn
4192+
type: bool
4193+
short-summary: Get private cluster credential with server address to be public fqdn.
41914194
examples:
41924195
- name: Connect to a managed Kubernetes cluster using Azure Bastion with custom port and admin credentials.
41934196
text: az aks bastion -g MyResourceGroup --name MyManagedCluster --bastion MyBastionResource --port 50001 --admin

src/aks-preview/azext_aks_preview/custom.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4969,7 +4969,7 @@ def aks_loadbalancer_rebalance_nodes(
49694969
return aks_loadbalancer_rebalance_internal(managed_clusters_client, parameters)
49704970

49714971

4972-
def aks_bastion(cmd, client, resource_group_name, name, bastion=None, port=None, admin=False, yes=False):
4972+
def aks_bastion(cmd, client, resource_group_name, name, bastion=None, port=None, admin=False, yes=False, public_fqdn=False):
49734973
import asyncio
49744974
import tempfile
49754975

@@ -4998,6 +4998,7 @@ def aks_bastion(cmd, client, resource_group_name, name, bastion=None, port=None,
49984998
port,
49994999
mc_id,
50005000
kubeconfig_path,
5001+
public_fqdn=public_fqdn,
50015002
test_hook=os.getenv("AKS_BASTION_TEST_HOOK"),
50025003
)
50035004
)

0 commit comments

Comments
 (0)