This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get pods --field-selector=status.phase=Failed | |
kubectl delete pods --field-selector=status.phase=Failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat <<EOF | kubectl apply -f - | |
apiVersion: v1 | |
kind: Secret | |
apiVersion: v1 | |
metadata: | |
name: your-sslcerts | |
data: | |
tls.crt: your base-64 string | |
tls.key: your base-64 string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: angular-app | |
labels: | |
app: angular-app | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env: | |
REGISTRY_NAME: your-container-register-name | |
CLUSTER_NAME: your-aks-cluster | |
CLUSTER_RESOURCE_GROUP: your-cluster-group | |
NAMESPACE: default | |
APP_NAME: angular-frontned | |
SOURCE_FOLDER: ./ | |
name: Angular Frontend dev AKS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as pulumi from "@pulumi/pulumi"; | |
import * as k8s from "@pulumi/kubernetes"; | |
import { DeploymentConsts } from "../../common/consts"; | |
export class ApiService { | |
New() { | |
const config = new pulumi.Config(); | |
const service = new k8s.core.v1.Service(DeploymentConsts.TMDB_API, { | |
metadata: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as k8s from "@pulumi/kubernetes"; | |
import { DeploymentConsts } from "../../common/consts"; | |
import * as pulumi from "@pulumi/pulumi"; | |
export class ApiDeployment { | |
config = new pulumi.Config(); | |
configMap = DeploymentConsts.TMDB_API; | |
New() { | |
return new k8s.apps.v1.Deployment(DeploymentConsts.TMDB_API + "-deployment", { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stage 1 | |
FROM node:14.4.0-alpine as node | |
WORKDIR /usr/src/app | |
COPY package*.json ./ | |
RUN npm install | |
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as pulumi from "@pulumi/pulumi"; | |
import * as azure from "@pulumi/azure"; | |
import * as azuread from "@pulumi/azuread"; | |
import { DeploymentConsts } from '../common/consts'; | |
import * as config from '../common/config'; | |
//create Azure AD Application for AKS | |
export function newAks(resourceGroup: azure.core.ResourceGroup) { | |
const adApp = new azuread.Application(DeploymentConsts.APP_NAME + '-ad-app'); | |
const adSp = new azuread.ServicePrincipal(DeploymentConsts.APP_NAME + "-aksSp", { applicationId: adApp.applicationId }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as pulumi from "@pulumi/pulumi"; | |
import * as azure from "@pulumi/azure"; | |
import { DeploymentConsts } from '../common/consts'; | |
export const dbUserName = "sql"; | |
export const dbUserPwd = "your-password";//hard-code, please use Pulumi config for this setting | |
export function newSqlServer(resourceGroup: azure.core.ResourceGroup) { | |
const serverName = DeploymentConsts.APP_NAME + "-sql-server"; | |
return new azure.sql.SqlServer(serverName, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react" | |
import Layout from './components/layout' | |
export default function Home() { | |
return ( | |
<Layout> | |
<span>Hello!</span> | |
</Layout> | |
) | |
} |
NewerOlder