AVI: Difference between revisions

From Network Security Wiki
Content added Content deleted
m (Protected "AVI" ([Edit=Allow only logged in users] (indefinite) [Move=Allow only logged in users] (indefinite) [Delete=Allow only logged in users] (indefinite)))
No edit summary
Line 1: Line 1:
[[Category:AVI]]
__TOC__
<br />


= Kubernetes Integration=


Create a Service Account
Create a Service Account
Line 117: Line 121:
Enter the Master IP address & Token in AVI Portal:
Enter the Master IP address & Token in AVI Portal:
https://10.1.10.160:6443
https://10.1.10.160:6443

<br />
;References
<references/>
<br />
<br />
<br />


{{DISQUS}}

Revision as of 15:29, 5 June 2018


Kubernetes Integration

Create a Service Account

kubectl create serviceaccount avi -n default

Create a Cluster Role for deploying Avi Service Engines as a pod:

nano clusterrole.json 
{
    "apiVersion": "rbac.authorization.k8s.io/v1beta1",
    "kind": "ClusterRole",
    "metadata": {
        "name": "avirole"
    },
    "rules": [
        {
            "apiGroups": [
                ""
            ],
            "resources": [
                "*"
            ],
            "verbs": [
                "get",
                "list",
                "watch"
            ]
        },
        {
            "apiGroups": [
                ""
            ],
            "resources": [
                "pods",
                "replicationcontrollers"
            ],
            "verbs": [
                "get",
                "list",
                "watch",
                "create",
                "delete",
                "update"
            ]
        },
        {
            "apiGroups": [
                ""
            ],
            "resources": [
                "secrets"
            ],
            "verbs": [
                "get",
                "list",
                "watch",
                "create",
                "delete",
                "update"
            ]
        },
        {
            "apiGroups": [
                "extensions"
            ],
            "resources": [
                "daemonsets",
                "ingresses"
            ],
            "verbs": [
                "create",
                "delete",
                "get",
                "list",
                "update",
                "watch"
            ]
        }
    ]
}
kubectl create -f clusterrole.json

Create Cluster Role Binding nano clusterbinding.json

{
    "apiVersion": "rbac.authorization.k8s.io/v1beta1",
    "kind": "ClusterRoleBinding",
    "metadata": {
      "name": "avirolebinding",
      "namespace": "default"
  },
    "roleRef": {
        "apiGroup": "rbac.authorization.k8s.io",
        "kind": "ClusterRole",
        "name": "avirole"
    },
    "subjects": [
        {
            "kind": "ServiceAccount",
            "name": "avi",
            "namespace": "default"
        }
    ]
}
kubectl create -f clusterbinding.json

Extract the Token for Use in Avi Cloud Configuration

kubectl describe serviceaccount avi -n default
kubectl describe secret avi-token-esdf0 -n default

Enter the Master IP address & Token in AVI Portal:

https://10.1.10.160:6443


References





{{#widget:DISQUS |id=networkm |uniqid=AVI |url=https://aman.awiki.org/wiki/AVI }}