Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs: add documentation for installing Coder on Azure with Kubernetes#16216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
EdwardAngert wants to merge7 commits intomain
base:main
Choose a base branch
Loading
from16074-azure-app-gateway
Draft
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletionsdocs/install/kubernetes.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -284,13 +284,17 @@ coder:

### Azure

In certainenterprise environments, the
[Azure Application Gateway](https://learn.microsoft.com/en-us/azure/application-gateway/ingress-controller-overview)
was needed.The Application Gateway supports:
Certainenterprise environments require the
[Azure Application Gateway](https://learn.microsoft.com/en-us/azure/application-gateway/ingress-controller-overview).
The Application Gateway supports:

- Websocket traffic (required for workspace connections)
- TLS termination

Follow our doc on
[how to deploy Coder on Azure with an Application Gateway](./kubernetes/kubernetes-azure-app-gateway.md)
for an example.

## Troubleshooting

You can view Coder's logs by getting the pod name from `kubectl get pods` and
Expand Down
167 changes: 167 additions & 0 deletionsdocs/install/kubernetes/kubernetes-azure-app-gateway.md
View file
Open in desktop
Copy link
Member

Choose a reason for hiding this comment

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

Since this is a tutorial, should we move it to the tutorials section? We can still link to it from the installation section.

Another suggestion is to update the documentation engine to list all documents with atutorial tag under the tutorials section. We can use markdown frontmatter metadata for tags.

These comments are non-blocking, so please proceed, and you can consider them at a later time.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I haven't really decided on what should definitely be Tutorials vs what shouldn't - in this case, I think this is closest to steps a user would take as part of a K8s install whereas something in Tutorials might combine several different processes in one place.

also:#16428

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
# Deploy Coder on Azure with an Application Gateway

In certain enterprise environments, the [Azure Application Gateway](https://learn.microsoft.com/en-us/azure/application-gateway/ingress-controller-overview) is required.

These steps serve as a proof-of-concept example so that you can get Coder running with Kubernetes on Azure. Your deployment might require a separate Postgres server or signed certificates.

The Application Gateway supports:

- Websocket traffic (required for workspace connections)
- TLS termination

Refer to Microsoft's documentation on how to [enable application gateway ingress controller add-on for an existing AKS cluster with an existing application gateway](https://learn.microsoft.com/en-us/azure/application-gateway/tutorial-ingress-controller-add-on-existing).
The steps here follow the Microsoft tutorial for a Coder deployment.

## Deploy Coder on Azure with an Application Gateway

1. Create Azure resource group:

```sql
az group create --name myResourceGroup --location eastus
```

1. Create AKS cluster:

```sql
az aks create --name myCluster --resource-group myResourceGroup --network-plugin azure --enable-managed-identity --generate-ssh-keys
```

1. Create public IP:

```sql
az network public-ip create --name myPublicIp --resource-group myResourceGroup --allocation-method Static --sku Standard
```

1. Create VNet and subnet:

```sql
az network vnet create --name myVnet --resource-group myResourceGroup --address-prefix 10.0.0.0/16 --subnet-name mySubnet --subnet-prefix 10.0.0.0/24
```

1. Create Azure application gateway, attach VNet, subnet and public IP:

```sql
az network application-gateway create --name myApplicationGateway --resource-group myResourceGroup --sku Standard_v2 --public-ip-address myPublicIp --vnet-name myVnet --subnet mySubnet --priority 100
```

1. Get app gateway ID:

```sql
appgwId=$(az network application-gateway show --name myApplicationGateway --resource-group myResourceGroup -o tsv --query "id")
```

1. Enable app gateway ingress to AKS cluster:

```sql
az aks enable-addons --name myCluster --resource-group myResourceGroup --addon ingress-appgw --appgw-id $appgwId
```

1. Get AKS node resource group:

```sql
nodeResourceGroup=$(az aks show --name myCluster --resource-group myResourceGroup -o tsv --query "nodeResourceGroup")
```

1. Get AKS VNet name:

```sql
aksVnetName=$(az network vnet list --resource-group $nodeResourceGroup -o tsv --query "[0].name")
```

1. Get AKS VNet ID:

```sql
aksVnetId=$(az network vnet show --name $aksVnetName --resource-group $nodeResourceGroup -o tsv --query "id")
```

1. Peer VNet to AKS VNet:

```sql
az network vnet peering create --name AppGWtoAKSVnetPeering --resource-group myResourceGroup --vnet-name myVnet --remote-vnet $aksVnetId --allow-vnet-access
```

1. Get app gateway VNet ID:

```sql
appGWVnetId=$(az network vnet show --name myVnet --resource-group myResourceGroup -o tsv --query "id")
```

1. Peer AKS VNet to app gateway VNet:

```sql
az network vnet peering create --name AKStoAppGWVnetPeering --resource-group $nodeResourceGroup --vnet-name $aksVnetName --remote-vnet $appGWVnetId --allow-vnet-access
```

1. Get AKS credentials:

```sql
az aks get-credentials --name myCluster --resource-group myResourceGroup
```

1. Create Coder namespace:

```shell
kubectl create ns coder
```

1. Deploy non-production PostgreSQL instance to AKS cluster:

```shell
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install coder-db bitnami/postgresql \
--namespace coder \
--set auth.username=coder \
--set auth.password=coder \
--set auth.database=coder \
--set persistence.size=10Gi
```

1. Create the PostgreSQL secret:

```shell
kubectl create secret generic coder-db-url -n coder --from-literal=url="postgres://coder:coder@coder-db-postgresql.coder.svc.cluster.local:5432/coder?sslmode=disable"
```

1. Deploy Coder to AKS cluster:

```shell
helm repo add coder-v2 https://helm.coder.com/v2
helm install coder coder-v2/coder \
--namespace coder \
--values values.yaml \
--version 2.18.5
```

1. Clean up Azure resources:

```sql
az group delete --name myResourceGroup
az group delete --name MC_myResourceGroup_myCluster_eastus
```

1. Deploy the gateway - this needs clarification

1. After you deploy the gateway, add the following entries to Helm's `values.yaml` file before you deploy Coder:

```yaml
service:
enable: true
type: ClusterIP
sessionAffinity: None
externalTrafficPolicy: Cluster
loadBalancerIP: ""
annotations: {}
httpNodePort: ""
httpsNodePort: ""

ingress:
enable: true
className: "azure-application-gateway"
host: ""
wildcardHost: ""
annotations: {}
tls:
enable: false
secretName: ""
wildcardSecretName: ""
```
9 changes: 8 additions & 1 deletiondocs/manifest.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,7 +41,14 @@
"title": "Kubernetes",
"description": "Install Coder on Kubernetes",
"path": "./install/kubernetes.md",
"icon_path": "./images/icons/kubernetes.svg"
"icon_path": "./images/icons/kubernetes.svg",
"children": [
{
"title": "Deploy Coder on Azure with an Application Gateway",
"description": "Deploy Coder on Azure with an Application Gateway",
"path": "./install/kubernetes/kubernetes-azure-app-gateway.md"
}
]
},
{
"title": "Rancher",
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp