Skip to content

Instantly share code, notes, and snippets.

@gowatana

gowatana/web-avi.yml

Last active Apr 4, 2021
Embed
What would you like to do?
---
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

This comment has been minimized.

Copy link
Owner Author

@gowatana 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