Skip to content

Commit b0ad32c

Browse files
authored
Merge pull request #1 from citrix/docs
Citrix k8s node controller documentation
2 parents 70f7715 + b64f451 commit b0ad32c

File tree

3 files changed

+23
-31
lines changed

3 files changed

+23
-31
lines changed

README.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,27 @@
1010

1111
# Citrix k8s node controller
1212

13-
Citrix k8s node controller is a micro service provided by Citrix that creates network between the Kubernetes cluster and ingress device.
13+
Citrix k8s node controller is deployed as a pod in Kubernetes cluster that provides a network between the Kubernetes cluster and the Ingress Citrix ADC.
1414

1515
>**Note:**
1616
>Citrix k8s node controller currently works only with flannel as the Container Network Interface (CNI). The scope of Citrix node controller can be extended to other CNI.
1717
1818
## Contents
1919

20-
- [Overview](#overview)
21-
- [Architecture](#architecture)
22-
- [How it works](#how-it-works)
23-
- [Get started](#get-started)
24-
- [Issues](#issues)
25-
- [Code of conduct](#code-of-conduct)
26-
- [License](#License)
20+
+ [Overview](#Overview)
21+
+ [Architecture](#Architecture)
22+
+ [How it works](#How-it-works)
23+
+ [Get started](#Get-started)
24+
+ [Questions](#Questions)
25+
+ [Issues](#Issues)
26+
+ [Code of conduct](#Code-of-conduct)
27+
+ [License](#License)
2728

2829
## Overview
2930

3031
In Kubernetes environments, when you expose the services for external access through the Ingress device, to route the traffic into the cluster, you need to appropriately configure the network between the Kubernetes nodes and the Ingress device. Configuring the network is challenging as the pods use private IP addresses based on the CNI framework. Without proper network configuration, the Ingress device cannot access these private IP addresses. Also, manually configuring the network to ensure such reachability is cumbersome in Kubernetes environments.
3132

32-
Citrix provides a microservice called as **Citrix k8s node controller** that you can use to create the network between the cluster and the Ingress device.
33+
Citrix k8s node controller is deployed as a pod in Kubernetes cluster that provides a network between the Kubernetes cluster and the Ingress Citrix ADC.
3334

3435
## Architecture
3536

@@ -64,26 +65,30 @@ The are the main components of the Citrix k8s node controller:
6465
</details>
6566
<details>
6667
<summary>**Config Maps**</summary>
67-
The **Config Maps** component controls the Citrix k8s node controller. It allows you to define Citrix k8s node controller to automatically create, apply, and delete routing configuration on Citrix ADC.
68+
The **Config Maps** component controls the Citrix k8s node controller. It allows you to define the Citrix k8s node controller to automatically create, apply, and delete routing configuration on Citrix ADC.
6869
</details>
6970

7071
## How it works
7172

72-
Citrix k8s node controller monitors the node events and establishes a route between the node to Citrix ADC using VXLAN. Citrix k8s node controller adds route on the Citrix ADC when a new node joins to the cluster. Similarly when a node leaves the cluster, Citrix k8s node controller removes the associated route from the Citrix ADC. Citrix k8s node controller uses VXLAN overlay between the Kubernetes cluster and Citrix ADC for service routing.
73+
Citrix k8s node controller monitors the node events and establishes a route between the cluster nodes and Citrix ADC using VXLAN. Citrix k8s node controller adds a route on the Citrix ADC when a new node joins to the cluster. Similarly when a node leaves the cluster, Citrix k8s node controller removes the associated route from the Citrix ADC. Citrix k8s node controller uses VXLAN overlay between the Kubernetes cluster and Citrix ADC for service routing.
7374

7475
## Get started
7576

7677
Citrix k8s node controller can be used in the following two ways:
7778

78-
- In cluster Citrix k8s node controller configuration. In this configuration, the Citrix k8s node controller is run as **microservice**.
79-
- Out of the cluster Citrix k8s node controller configuration. In this configuration, the Citrix k8s node controller is run as a **process**.
79+
- **Inside the cluster** - In this configuration, the Citrix k8s node controller is run as **pod**.
80+
- **Outside the cluster** - In this configuration, the Citrix k8s node controller is run as a **process**.
8081

8182
>**Important:**
82-
>Citrix recommends that you use **In cluster configuration** for production. And, use the **Out of cluster configuration** for easy development.
83+
>Citrix recommends that you use **Inside the cluster** configuration for production. And, use the **Outside the cluster** configuration for development environments.
84+
85+
### Using Citrix k8s node controller as a pod
86+
87+
Refer the [deployment](deploy/README.md) page for running Citrix k8s node controller as a pod inside the Kubernetes cluster.
8388

8489
### Using Citrix k8s node controller as a process
8590

86-
Before you deploy the citrix-k8s-node-controller` package, ensure that you have installed Go binary for running MIC.
91+
Before you deploy the citrix-k8s-node-controller package, ensure that you have installed [Go package](https://golang.org/doc/).
8792

8893
Perform the following:
8994

@@ -97,10 +102,6 @@ Perform the following:
97102

98103
kubectl apply -f https://raw.githubusercontent.com/citrix/citrix-k8s-node-controller/master/deploy/config_map.yaml
99104

100-
### Using Citrix k8s node controller as a microservice
101-
102-
Refer the [deployment](deploy/README.md) page for running Citrix k8s node controller as a microservice inside the Kubernetes cluster.
103-
104105
## Questions
105106

106107
For questions and support the following channels are available:

deploy/README.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ Citrix k8s node controller is controlled using a [config map](https://github.com
1010
[config_map.yaml](https://github.com/citrix/citrix-k8s-node-controller/blob/master/deploy/config_map.yaml):
1111

1212
```yaml
13-
apiVersion: v1
14-
kind: Namespace
15-
metadata:
16-
name: citrix
17-
labels:
18-
name: citrix
19-
---
2013
kind: ConfigMap
2114
apiVersion: v1
2215
metadata:
@@ -44,19 +37,18 @@ Perform the following:
4437

4538
- Citrix Node Controller service (`citrix-node-controller`)
4639

47-
You don't have to modify the definitions for `ClusterRole`, `ClusterRoleBinding`, and `ServiceAccount` definitions. The definitions are used by Citrix node controller to monitor Kubernetes events. But, in the`citrix-node-controller` definition you have to provide the values for the environment variables that is required for Citrix k8s node controller to configure the Citric ADC.
40+
You don't have to modify the definitions for `ClusterRole`, `ClusterRoleBinding`, and `ServiceAccount` definitions. The definitions are used by Citrix node controller to monitor Kubernetes events. But, in the`citrix-node-controller` definition you have to provide the values for the environment variables that is required for Citrix k8s node controller to configure the Citrix ADC.
4841

4942
You must provide values for the following environment variables in the Citrix k8s node controller service definition:
5043

5144
| Environment Variable | Mandatory or Optional | Description |
5245
| -------------------- | --------------------- | ----------- |
53-
| NS_IP | Mandatory | Citrix k8s node controller uses this IP address to configure the Citrix ADC. The NS_IP can be anyone of the following: </br> - NSIP for standalone Citrix ADC </br>- SNIP for high availability deployments (Ensure that management access is enabled) </br> - CLIP for Cluster deployments |
46+
| NS_IP | Mandatory | Citrix k8s node controller uses this IP address to configure the Citrix ADC. The NS_IP can be anyone of the following: </br>- SNIP for high availability and standalone deployments (Ensure that management access is enabled) </br> - CLIP for Cluster deployments |
5447
| NS_USER and NS_PASSWORD | Mandatory | The user name and password of Citrix ADC. Citrix k8s node controller uses these credentials to authenticate with Citrix ADC. You can either provide the user name and password or Kubernetes secrets. If you want to use a non-default Citrix ADC user name and password, you can [create a system user account in Citrix ADC](https://developer-docs.citrix.com/projects/citrix-k8s-ingress-controller/en/latest/deploy/deploy-cic-yaml/#create-system-user-account-for-citrix-ingress-controller-in-citrix-adc). </br> The deployment file uses Kubernetes secrets, create a secret for the user name and password using the following command: </br> `kubectl create secret generic nslogin --from-literal=username='nsroot' --from-literal=password='nsroot'` </br> **Note**: If you want to use a different secret name other than `nslogin`, ensure that you update the `name` field in the `citrix-node-controller` definition. |
55-
| NODE_CNI_CIDR | Mandatory | Provide the node [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) of the Kubernetes cluster.|
48+
| NODE_CNI_CIDR | Mandatory | Provide the node [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) of the Kubernetes cluster. Use the following command to view the node CIDR: </br> `cat /run/flannel/subnet.env` </br> The node CIDR is displayed as `FLANNEL_NETWORK`.|
5649
| NS_POD_CIDR | Mandatory | Provide a pod CIDR from the node CIDR in the Kubernetes cluster to create an overlay network between Citrix ADC and Kubernetes cluster. </br> For example, if the node CIDR in the Kubernetes cluster is `10.244.0.0/16` and the pod CIDRs of the nodes are `10.244.0.1/24`, `10.244.1.1/24`, `10.244.2.1/24`. You can provide a pod CIDR `10.244.254.1/24` that is not allocated to the nodes.|
5750
| NS_VTEP_MAC | Mandatory | Provide [VMAC](https://docs.citrix.com/en-us/netscaler/12/system/high-availability-introduction/configuring-virtual-mac-addresses-high-availability.html) that you have configured on the Citrix ADC as an interface towards your Kubernetes cluster. |
5851
| NS_NETPROFILE | Mandatory | Provide the network profile (netprofile) name that you have used in the Citrix ingress controller.|
59-
| NS_VTEP_IP | Optional | Use this argument to provide IP address as VTEP, if you do not want to use `NS_IP` |
6052
| NS_VXLAN_ID | Optional | This argument is only applicable for Flannel CNI. If Flannel uses a different `VXLAN_ID`, Use this argument to provide the `VXLAN_ID` |
6153
| K8S_VXLAN_PORT | Optional | If the Kubernetes cluster VXLAN port is other than 8472, you have to provide the Kubernetes VXLAN port number using this parameter. |
6254

deploy/config_map.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
apiVersion: v1
21
kind: ConfigMap
32
apiVersion: v1
43
metadata:

0 commit comments

Comments
 (0)