aspir8-from-scratch

(★ 48)

Let's deploy Aspire-flavoured apps to a Kubernetes cluster, through Aspir8! Are you new to Kubernetes? Don't worry. Let's start from scratch.

File Explorer

  • .editorconfig
  • .gitignore
  • admin-user.yaml
  • Aspir8.sln
  • aspire-dashboard.yaml
  • Directory.Build.props
  • eks-cluster-role-trust-policy.json
  • eks-node-role-trust-policy.json
  • global.json
  • LICENSE
  • load-balancer.yaml
  • README.md

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

aws cloudformation

View Details ▼

Model, provision, and manage AWS and third-party resources by treating infrastructure as code.

aws cloudformation create-stack --stack-name {{stack-name}} --region {{region}} --template-body {{file://path/to/file.yml}} --profile {{profile}}

Create a stack from a template file:

aws cloudformation delete-stack --stack-name {{stack-name}} --profile {{profile}}

Delete a stack:

aws cloudformation list-stacks --profile {{profile}}

List all stacks:

🔍

aws ecr

View Details ▼

Push, pull, and manage container images.

aws ecr get-login-password --region {{region}} | {{docker login}} --username AWS --password-stdin {{aws_account_id}}.dkr.ecr.{{region}}.amazonaws.com

Authenticate Docker with the default registry (username is AWS):

aws ecr create-repository --repository-name {{repository}} --image-scanning-configuration scanOnPush={{true|false}} --region {{region}}

Create a repository:

docker tag {{container_name}}:{{tag}} {{aws_account_id}}.dkr.ecr.{{region}}.amazonaws.com/{{container_name}}:{{tag}}

Tag a local image for ECR:

🔍

aws eks

View Details ▼

Manage Amazon Elastic Kubernetes Service (EKS) addons, clusters, and node groups.
Amazon EKS is a service for easily running Kubernetes on AWS.

aws eks create-cluster --name {{cluster_name}} --role-arn {{eks_service_role_arn}} --resources-vpc-config subnetIds={{subnet_ids}},securityGroupIds={{security_group_ids}}

Create an EKS Cluster:

aws eks update-kubeconfig --name {{cluster_name}}

Update kubeconfig to connect to the EKS Cluster:

aws eks list-clusters

List available EKS clusters:

🔍

aws iam

View Details ▼

Interact with Identity and Access Management (IAM), a web service for securely controlling access to AWS services.

aws iam list-users

List users:

aws iam list-policies

List policies:

aws iam list-groups

List groups:

🔍

az acr

View Details ▼

Manage private registries with Azure Container Registries.
Part of `azure-cli` (also known as `az`).

az acr create {{[-n|--name]}} {{registry_name}} {{[-g|--resource-group]}} {{resource_group}} --sku {{sku}}

Create a managed container registry:

az acr login {{[-n|--name]}} {{registry_name}}

Login to a registry:

docker tag {{image_name}} {{registry_name}}.azurecr.io/{{image_name}}:{{tag}}

Tag a local image for ACR:

🔍

az aks

View Details ▼

Manage Azure Kubernetes Service (AKS) clusters.
Part of `azure-cli` (also known as `az`).

az aks list {{[-g|--resource-group]}} {{resource_group}}

List AKS clusters:

az aks create {{[-g|--resource-group]}} {{resource_group}} {{[-n|--name]}} {{name}} {{[-c|--node-count]}} {{count}} --node-vm-size {{size}}

Create a new AKS cluster:

az aks delete {{[-g|--resource-group]}} {{resource_group}} {{[-n|--name]}} {{name}}

Delete an AKS cluster:

🔍

az group

View Details ▼

Manage resource groups and template deployments.
Part of `azure-cli` (also known as `az`).

az group create {{[-n|--name]}} {{name}} {{[-l|--location]}} {{location}}

Create a new resource group:

az group exists {{[-n|--name]}} {{name}}

Check if a resource group exists:

az group delete {{[-n|--name]}} {{name}}

Delete a resource group:

🔍

docker login

View Details ▼

Log into a Docker registry.

docker login

Interactively log into a registry:

docker login {{[-u|--username]}} {{username}}

Log into a registry with a specific username (user will be prompted for a password):

docker login {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} {{server}}

Log into a registry with username and password:

🔍

docker run

View Details ▼

This command is an alias of `docker container run`.

tldr docker container run

View documentation for the original command:

🔍

dotnet restore

View Details ▼

Restores the dependencies and tools of a .NET project.

dotnet restore

Restore dependencies for a .NET project or solution in the current directory:

dotnet restore {{path/to/project_or_solution}}

Restore dependencies for a .NET project or solution in a specific location:

dotnet restore --no-http-cache

Restore dependencies without caching the HTTP requests:

🔍

dotnet run

View Details ▼

Run a .NET application without explicit compile or launch commands.

dotnet run

Run the project in the current directory:

dotnet run --project {{path/to/file.csproj}}

Run a specific project:

dotnet run -- {{arg1=foo arg2=bar ...}}

Run the project with specific arguments:

🔍

dotnet tool

View Details ▼

Manage .NET tools and search published tools in NuGet.

dotnet tool install {{[-g|--global]}} {{dotnetsay}}

Install a global tool (don't use `--global` for local tools):

dotnet tool restore

Install tools defined in the local tool manifest:

dotnet tool update {{[-g|--global]}} {{tool_name}}

Update a specific global tool (don't use `--global` for local tools):

🔍

dotnet

View Details ▼

Cross platform .NET tools for .NET Core.
Some subcommands such as `build` have their own usage documentation.

dotnet new {{template_short_name}}

Initialize a new .NET project:

dotnet restore

Restore NuGet packages:

dotnet run

Build and execute the .NET project in the current directory:

🔍

helm

View Details ▼

A package manager for Kubernetes.
Some subcommands such as `install` have their own usage documentation.

helm create {{chart_name}}

Create a helm chart:

helm repo add {{repository_name}}

Add a new helm repository:

helm repo {{[ls|list]}}

List helm repositories:

🔍

kubectl apply

View Details ▼

Manage applications through files defining Kubernetes resources.
Create and update resources in a cluster.

kubectl apply {{[-f|--filename]}} {{path/to/file}}

Apply a configuration to a resource by file name:

kubectl apply {{[-k|--kustomize]}} {{path/to/directory}}

Apply a configuration to a resource from `kustomization.yaml` in a directory:

{{cat pod.json}} | kubectl apply {{[-f|--filename]}} -

Apply a configuration to a resource by `stdin`:

🔍

kubectl config

View Details ▼

Manage Kubernetes configuration (kubeconfig) files for accessing clusters via `kubectl` or the Kubernetes API.
By default, the Kubernetes will get its configuration from `${HOME}/.kube/config`.
See also: `kubectx`, `kubens`.

kubectl config get-contexts

Get all contexts in the default kubeconfig file:

kubectl config {{get-clusters|get-contexts|get-users}} --kubeconfig {{path/to/kubeconfig.yaml}}

Get all clusters/contexts/users in a custom kubeconfig file:

kubectl config current-context

Get the current context:

🔍

kubectl get

View Details ▼

Get Kubernetes objects and resources.

kubectl get {{[ns|namespaces]}}

Get all namespaces in the current cluster:

kubectl get {{[no|nodes]}} {{[-n|--namespace]}} {{namespace}}

Get nodes in a specified namespace:

kubectl get {{[po|pods]}} {{[-n|--namespace]}} {{namespace}}

Get pods in a specified namespace:

🔍

kubectl proxy

View Details ▼

Create a proxy server or application-level gateway between localhost and the Kubernetes API server.

kubectl proxy

Run a proxy using the default settings on port 8001 and listen on localhost:

kubectl proxy {{[-w|--www]}} {{path/to/static_dir}} {{[-P|--www-prefix]}} {{/static_prefix/}} --api-prefix {{/api_subset/}}

Proxy part of the Kubernetes API while serving static files from a local directory:

kubectl proxy --api-prefix {{/custom_prefix/}}

Proxy the entire Kubernetes API under a custom prefix:

🔍

kubectl

View Details ▼

Run commands against Kubernetes clusters.
Some subcommands such as `run` have their own usage documentation.

kubectl get {{pods|service|deployment|ingress|...}} {{[-o|--output]}} wide

List information about a resource with more details:

kubectl label pods {{name}} unhealthy=true

Update specified pod with the label `unhealthy` and the value `true`:

kubectl get all

List all resources with different types:

🔍

xml

View Details ▼

XMLStarlet Toolkit: query, edit, check, convert, and transform XML documents.
Some subcommands such as `validate` have their own usage documentation.

xml --help

Display general help, including the list of subcommands:

xml {{subcommand}} {{options}} {{path/to/input.xml|uri}}

Execute a subcommand with input from a file or URI, printing to `stdout`:

xml {{subcommand}} {{options}}

Execute a subcommand using `stdin` and `stdout`:

// repository documentation