K8s Common Instructions

ps aux | grep kubectl

Namespace Create

1
kubectl create namespace mogo

Port Exposure

1
kc port-forward deployment/prometheus 9090:9090

Ingress Rewrite

1
nginx.ingress.kubernetes.io/server-snippet: rewrite / https://mdp-hw.shimodev.com/clickvisual$uri permanent;

Port Agent

1
kc port-forward deployment/prometheus 9090:9090

Error Code

  • 255 physical machine restart
  • 134 service inner error

Front-End Compilation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
FROM xxx AS js-builder

ENV NODE_OPTIONS=--max_old_space_size=8000
WORKDIR /clickvisual
COPY ui/package.json ui/yarn.lock ./
RUN npm config set registry https://registry.npm.taobao.org
RUN npm config get registry
RUN yarn config set registry https://registry.npm.taobao.org
RUN yarn config get registry
RUN yarn install --network-timeout 100000
ENV NODE_ENV production
ENV PUBLIC_PATH /clickvisual/

COPY ui .
RUN yarn build