Skip to content

Instantly share code, notes, and snippets.

@gowatana
Last active April 4, 2021 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gowatana/c28df7eb6d4219aa95ec922a8d222f05 to your computer and use it in GitHub Desktop.
Save gowatana/c28df7eb6d4219aa95ec922a8d222f05 to your computer and use it in GitHub Desktop.
---
kind: Service
apiVersion: v1
metadata:
name: svc-web
spec:
type: LoadBalancer
selector:
app: httpd
ports:
- port: 80
protocol: TCP
targetPort: 80
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: web
spec:
replicas: 1
selector:
matchLabels:
app: httpd
template:
metadata:
labels:
app: httpd
spec:
containers:
- name: httpd
image: gowatana/centos7:httpd
ports:
- containerPort: 80
protocol: TCP
command:
- bash
- -c
- |
N=$(uname -n)
HTML=/var/www/html/index.html
echo '<h1>httpd on <font color=orange>NSX-ALB(Avi)</font></h1>' > $HTML
echo 'Pod: ' $N >> $HTML
httpd -D FOREGROUND
@gowatana
Copy link
Author

gowatana commented Apr 4, 2021

下記の投稿むけ。

vSphere with Tanzu NSX-ALB(Avi)版ラボ環境構築。Part-05 Tanzu Kubernetes クラスタの作成
https://vm.gowatana.jp/entry/2021/04/04/201906

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment