Byteplus Vital Kubernetes Engine(vke) 初探
本次創建 VKE 時選用 Vital Container Instance (VCI)進行創建, 在創建時遇到一些問題,所以透過這篇文章記錄下

而 vke 支持一鍵開啟 API Server 公網訪問創建完成vke之後,可以直接生成KubeConfig 。

若本機有安裝 k9s 即可直接連接 將以上配置 創建在本地 vi $HOME/.kube/config
將配置放入
之後直接運行 k9s 即可透過面板訪問節點。
查看node資訊 可以看到每個節點都有預設的 污點(Taint) vci.vke.volcengine.com/node-type=vci:NoSchedule
若要將pod 部署在該節點上 需要額外配置

若自行寫yaml 可以新增 tolerations 就可以部署在節點上。
spec:
progressDeadlineSeconds: 600
replicas: 2
revisionHistoryLimit: 10
selector:
matchLabels:
app: nginx
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app: nginx
spec:
containers:
- image: nginxdemos/hello:0.4
imagePullPolicy: IfNotPresent
name: nginx
ports:
- containerPort: 80
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
tolerations: # 新增污點容忍
- effect: NoSchedule
key: vci.vke.volcengine.com/node-type
operator: Equal
value: vci
若發現節點網速下載很慢,那可以到vpc設置NAT網關

之後會引導到 vpc 公網NAT網關,選擇公網IP ,點擊變更配置即可調整下載速度,而目前最大到200Mbps若還需要更高,可以購買流量包的方式提升。

