首页 > 其他分享 >部署serving

部署serving

时间:2022-10-17 15:56:22浏览次数:30  
标签:kubectl serving 部署 istio yaml Running knative

部署方法

https://knative.dev/docs/install/yaml-install/serving/install-serving-with-yaml/#prerequisites

部署serving核心组件

[root@master ~]# kubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.7.2/serving-crds.yaml
[root@master ~]# kubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.7.2/serving-core.yaml
[root@master ~]# kubectl get pods -n knative-serving
NAME                                   READY   STATUS    RESTARTS   AGE
activator-76cc45fff8-kl646             1/1     Running   0          145m
autoscaler-78f677f7fb-rpz5p            1/1     Running   0          134m
controller-6c498f87-j457v              1/1     Running   0          134m
domain-mapping-76dbd88d69-lw7rl        1/1     Running   0          134m
domainmapping-webhook-bcbc6464-pct45   1/1     Running   0          134m
webhook-5ff7fc4687-drkhr               1/1     Running   0          145m
[root@master ~]# kubectl get deployment -n knative-serving
NAME                    READY   UP-TO-DATE   AVAILABLE   AGE
activator               1/1     1            1           4h53m
autoscaler              1/1     1            1           4h53m
controller              1/1     1            1           4h53m
domain-mapping          1/1     1            1           4h53m
domainmapping-webhook   1/1     1            1           4h53m
webhook                 1/1     1            1           4h53m

部署网络组件

curl -LO https://github.com/knative/net-istio/releases/download/knative-v1.7.0/istio.yaml
vim istio.yaml  # 将policy/v1beta1修改为policy/v1
kubectl apply -l knative.dev/crd-install=true -f  istio.yaml
kubectl apply  -f  istio.yaml 
[root@master ~]# kubectl get ns
NAME              STATUS   AGE
default           Active   14d
istio-system      Active   4m12s
knative-serving   Active   34h
kube-node-lease   Active   14d
kube-public       Active   14d
kube-system       Active   14d
[root@master ~]# kubectl get pods -n istio-system
NAME                                    READY   STATUS    RESTARTS   AGE
istio-ingressgateway-6849fc894d-4slzl   1/1     Running   0          4m17s
istio-ingressgateway-6849fc894d-mvv5z   1/1     Running   0          4m17s
istio-ingressgateway-6849fc894d-n2g8t   1/1     Running   0          4m17s
istiod-9c5b49645-fj67w                  1/1     Running   0          4m7s
istiod-9c5b49645-jbtsc                  1/1     Running   0          4m17s
istiod-9c5b49645-slkc6                  1/1     Running   0          4m7s

Install a networking layer

kubectl apply -f https://github.com/knative/net-istio/releases/download/knative-v1.7.0/net-istio.yaml
[root@master ~]# kubectl get pods -n knative-serving
NAME                                    READY   STATUS             RESTARTS      AGE
activator-76cc45fff8-kl646              1/1     Running            0             32h
autoscaler-78f677f7fb-rpz5p             1/1     Running            0             32h
controller-6c498f87-j457v               1/1     Running            0             32h
domain-mapping-76dbd88d69-lw7rl         1/1     Running            0             32h
domainmapping-webhook-bcbc6464-2bj9t    1/1     Running            0             32h
net-istio-controller-56cc84bf8f-vq9fr   1/1     Running            0             76s
net-istio-webhook-5d9864f688-slffd      1/1     Running            0             76s
webhook-5ff7fc4687-drkhr                1/1     Running            0             32h

给ingressgateway添加一个外部地址 

kubectl edit service istio-ingressgateway -n istio-ingressgateway

[root@master ~]# kubectl --namespace istio-system get service istio-ingressgateway
NAME                   TYPE           CLUSTER-IP       EXTERNAL-IP    PORT(S)                                      AGE
istio-ingressgateway   LoadBalancer   10.100.247.178   10.211.55.30   15021:30446/TCP,80:31623/TCP,443:31154/TCP   57m

Configure DNS

标签:kubectl,serving,部署,istio,yaml,Running,knative
From: https://www.cnblogs.com/zyyang1993/p/16775961.html

相关文章