The real numbers $a_{1},a_{2},\ldots ,a_{n}$ where $n\ge 3$ are such that $\sum_{i=1}^{n}a_{i}=0$ and $2a_{k}\le\ a_{k-1}+a_{k+1}$ for all $k=2,3,\ldots ,n-1$. Find the least $f(n)$ such that, for all $k\in\left\{1,2,\ldots ,n\right\}$, we have $|a_{k}|\le f(n)\max\left\{|a_{1}|,|a_{n}|\right\}$.
1. **Initial Setup and Assumptions:**
   Given the real numbers \(a_1, a_2, \ldots, a_n\) where \(n \geq 3\), we have:
   \[
   \sum_{i=1}^{n} a_i = 0
   \]
   and
   \[
   2a_k \leq a_{k-1} + a_{k+1} \quad \text{for all} \quad k = 2, 3, \ldots, n-1.
   \]
   We need to find the least \(f(n)\) such that for all \(k \in \{1, 2, \ldots, n\}\), we have:
   \[
   |a_k| \leq f(n) \max\{|a_1|, |a_n|\}.
   \]

2. **Constructing a Sequence:**
   Consider the sequence:
   \[
   a_1 = 1, \quad a_2 = \frac{n+1}{n-1}, \quad a_k = -\frac{n+1}{n-1} + \frac{2n(k-2)}{(n-1)(n-2)} \quad \text{for} \quad k = 3, 4, \ldots, n.
   \]
   This sequence satisfies the given conditions. We need to show that \(f(n) \geq \frac{n+1}{n-1}\).

3. **Convexity and Bounds:**
   Notice that the sequence \(a_i\) is convex, meaning:
   \[
   a_k \leq \frac{1}{n-1}[(k-1)a_n + (n-k)a_1].
   \]
   For a fixed \(k\) (not equal to \(1\) and \(n\)), we have:
   \[
   a_j \leq \frac{1}{k-1}[(j-1)a_k + (k-j)a_1] \quad \text{for} \quad 1 \leq j \leq k,
   \]
   and
   \[
   a_j \leq \frac{1}{n-k}[(j-k)a_n + (n-j)a_k] \quad \text{for} \quad k \leq j \leq n.
   \]

4. **Summing the Inequalities:**
   Summing these inequalities, we get:
   \[
   \sum_{j=1}^{k} a_j \leq \frac{k}{2}(a_1 + a_k),
   \]
   and
   \[
   \sum_{j=k}^{n} a_j \leq \frac{n+1-k}{2}(a_k + a_n).
   \]

5. **Combining Results:**
   Combining these results, we obtain:
   \[
   a_k \leq \frac{k}{2}a_1 + \frac{n+1}{2}a_k + \frac{n+1-k}{2}a_n.
   \]
   Simplifying, we get:
   \[
   a_k \geq -\frac{1}{n-1}[ka_1 + (n+1-k)a_n].
   \]

6. **Conclusion:**
   From the above inequalities, we conclude that:
   \[
   f(n) = \frac{n+1}{n-1}.
   \]

The final answer is \(\boxed{\frac{n+1}{n-1}}\).