<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Agones – Advanced</title>
    <link>/site/docs/advanced/</link>
    <description>Recent content in Advanced on Agones</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Thu, 03 Jan 2019 05:44:55 +0000</lastBuildDate>
    
	  <atom:link href="/site/docs/advanced/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Docs: Scheduling and Autoscaling</title>
      <link>/site/docs/advanced/scheduling-and-autoscaling/</link>
      <pubDate>Thu, 03 Jan 2019 05:45:05 +0000</pubDate>
      
      <guid>/site/docs/advanced/scheduling-and-autoscaling/</guid>
      <description>
        
        
        &lt;h2 id=&#34;cluster-autoscaler&#34;&gt;Cluster Autoscaler&lt;/h2&gt;
&lt;p&gt;Kubernetes has a &lt;a href=&#34;https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler&#34;&gt;cluster node autoscaler that works with a wide variety of cloud providers&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The default scheduling strategy (&lt;code&gt;Packed&lt;/code&gt;) is designed to work with the Kubernetes autoscaler out of the box.&lt;/p&gt;
&lt;p&gt;The autoscaler will automatically add Nodes to the cluster when &lt;code&gt;GameServers&lt;/code&gt; don&amp;rsquo;t have room to be scheduled on the
clusters, and then scale down when there are empty Nodes with no &lt;code&gt;GameServers&lt;/code&gt; running on them.&lt;/p&gt;
&lt;p&gt;This means that scaling &lt;code&gt;Fleets&lt;/code&gt; up and down can be used to control the size of the cluster, as the cluster autoscaler
will adjust the size of the cluster to match the resource needs of one or more &lt;code&gt;Fleets&lt;/code&gt; running on it.&lt;/p&gt;
&lt;p&gt;To enable and configure autoscaling on your cloud provider, check their &lt;a href=&#34;https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/cloudprovider&#34;&gt;connector implementation&lt;/a&gt;,
or their cloud specific documentation.&lt;/p&gt;
&lt;h3 id=&#34;google-kubernetes-engine&#34;&gt;Google Kubernetes Engine&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-autoscaler&#34;&gt;Administering Clusters: Autoscaling a Cluster&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-autoscaler&#34;&gt;Cluster Autoscaler&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;amazon-elastic-kubernetes-service&#34;&gt;Amazon Elastic Kubernetes Service&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aws.amazon.com/eks/latest/userguide/cluster-autoscaler.html&#34;&gt;Cluster Autoscaler for EKS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;azure-kubernetes-service&#34;&gt;Azure Kubernetes Service&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/azure/aks/autoscaler&#34;&gt;Cluster Autoscaler on Azure Kubernetes Service (AKS) - Preview&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;fleet-autoscaling&#34;&gt;Fleet Autoscaling&lt;/h2&gt;
&lt;p&gt;Fleet autoscaling is the only type of autoscaling that exists in Agones. It is currently available as a
buffer autoscaling strategy or as a webhook driven strategy, such that you can provide your own autoscaling logic.&lt;/p&gt;
&lt;p&gt;Have a look at the &lt;a href=&#34;/site/site/docs/getting-started/create-fleetautoscaler/&#34;&gt;Create a Fleet Autoscaler&lt;/a&gt; quickstart, the
&lt;a href=&#34;/site/site/docs/getting-started/create-webhook-fleetautoscaler/&#34;&gt;Create a Webhook Fleet Autoscaler&lt;/a&gt; quickstart,
and the &lt;a href=&#34;/site/site/docs/reference/fleetautoscaler/&#34;&gt;Fleet Autoscaler Specification&lt;/a&gt; for details.&lt;/p&gt;
&lt;h2 id=&#34;autoscaling-concepts&#34;&gt;Autoscaling Concepts&lt;/h2&gt;
&lt;p&gt;To facilitate autoscaling, we need to combine several concepts and functionality, as described below.&lt;/p&gt;
&lt;h3 id=&#34;allocation-scheduling&#34;&gt;Allocation Scheduling&lt;/h3&gt;
&lt;p&gt;Allocation scheduling refers to the order in which &lt;code&gt;GameServers&lt;/code&gt;, and specifically their backing &lt;code&gt;Pods&lt;/code&gt; are chosen
from across the Kubernetes cluster within a given &lt;code&gt;Fleet&lt;/code&gt; when &lt;a href=&#34;/site/site/docs/getting-started/create-fleet/#4-allocate-a-game-server-from-the-fleet&#34;&gt;allocation&lt;/a&gt; occurs.&lt;/p&gt;
&lt;h3 id=&#34;pod-scheduling&#34;&gt;Pod Scheduling&lt;/h3&gt;
&lt;p&gt;Each &lt;code&gt;GameServer&lt;/code&gt; is backed by a Kubernetes &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/pod/&#34;&gt;&lt;code&gt;Pod&lt;/code&gt;&lt;/a&gt;. Pod scheduling
refers to the strategy that is in place that determines which node in the Kubernetes cluster the Pod is assigned to,
when it is created.&lt;/p&gt;
&lt;h3 id=&#34;fleet-scale-down-strategy&#34;&gt;Fleet Scale Down Strategy&lt;/h3&gt;
&lt;p&gt;Fleet Scale Down strategy refers to the order in which the &lt;code&gt;GameServers&lt;/code&gt; that belong to a &lt;code&gt;Fleet&lt;/code&gt; are deleted,
when Fleets are shrunk in size.&lt;/p&gt;
&lt;h2 id=&#34;fleet-scheduling&#34;&gt;Fleet Scheduling&lt;/h2&gt;
&lt;p&gt;There are two scheduling strategies for Fleets - each designed for different types of Kubernetes Environments.&lt;/p&gt;
&lt;h3 id=&#34;packed&#34;&gt;Packed&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/v1&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;kind&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Fleet&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;metadata&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;simple-game-server&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;replicas&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;100&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;scheduling&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Packed&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;template&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;ports&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;containerPort&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;7654&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;template&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;containers&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;          &lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;simple-game-server&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;            &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;image&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is the &lt;em&gt;default&lt;/em&gt; Fleet scheduling strategy. It is designed for dynamic Kubernetes environments, wherein you wish
to scale up and down as load increases or decreases, such as in a Cloud environment where you are paying
for the infrastructure you use.&lt;/p&gt;
&lt;p&gt;It attempts to &lt;em&gt;pack&lt;/em&gt; as much as possible into the smallest set of nodes, to make
scaling infrastructure down as easy as possible.&lt;/p&gt;
&lt;p&gt;This affects the Cluster autoscaler, Allocation Scheduling, Pod Scheduling and Fleet Scale Down Scheduling.&lt;/p&gt;
&lt;h4 id=&#34;cluster-autoscaler-1&#34;&gt;Cluster Autoscaler&lt;/h4&gt;
&lt;p&gt;When using the &amp;ldquo;Packed&amp;rdquo; strategy, Agones will ensure that the Cluster Autoscaler doesn&amp;rsquo;t attempt to evict and move &lt;code&gt;GameServer&lt;/code&gt; &lt;code&gt;Pods&lt;/code&gt; onto new Nodes during
gameplay.&lt;/p&gt;
&lt;p&gt;If a gameserver can tolerate &lt;a href=&#34;https://kubernetes.io/docs/concepts/scheduling-eviction/api-eviction/#how-api-initiated-eviction-works&#34;&gt;being evicted&lt;/a&gt;
(generally in combination with setting an appropriate graceful termination period on the gameserver pod) and you
want the Cluster Autoscaler to compact your cluster by evicting game servers when it would allow the Cluster
Autoscaler to reduce the number of nodes in the cluster, &lt;a href=&#34;/site/site/docs/advanced/controlling-disruption/&#34;&gt;Controlling Disruption&lt;/a&gt; describes
how to choose the &lt;code&gt;.eviction&lt;/code&gt; setting appropriate for your &lt;code&gt;GameServer&lt;/code&gt; or &lt;code&gt;Fleet&lt;/code&gt;.&lt;/p&gt;
&lt;h4 id=&#34;allocation-scheduling-strategy&#34;&gt;Allocation Scheduling Strategy&lt;/h4&gt;
&lt;p&gt;Under the &amp;ldquo;Packed&amp;rdquo; strategy, allocation will prioritise allocating &lt;code&gt;GameServers&lt;/code&gt; to nodes that are running on
Nodes that already have allocated &lt;code&gt;GameServers&lt;/code&gt; running on them.&lt;/p&gt;
&lt;h4 id=&#34;pod-scheduling-strategy&#34;&gt;Pod Scheduling Strategy&lt;/h4&gt;
&lt;p&gt;Under the &amp;ldquo;Packed&amp;rdquo; strategy, Pods will be scheduled using the &lt;a href=&#34;https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature&#34;&gt;&lt;code&gt;PodAffinity&lt;/code&gt;&lt;/a&gt;
with a &lt;code&gt;preferredDuringSchedulingIgnoredDuringExecution&lt;/code&gt; affinity with &lt;a href=&#34;https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#interlude-built-in-node-labels&#34;&gt;hostname&lt;/a&gt;
topology. This attempts to group together &lt;code&gt;GameServer&lt;/code&gt; Pods within as few nodes in the cluster as it can.&lt;/p&gt;


&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;

    The default Kubernetes scheduler doesn&amp;rsquo;t do a perfect job of packing, but it&amp;rsquo;s a good enough job for what we need -
at least at this stage.

&lt;/div&gt;

&lt;h4 id=&#34;fleet-scale-down-strategy-1&#34;&gt;Fleet Scale Down Strategy&lt;/h4&gt;
&lt;p&gt;With the &amp;ldquo;Packed&amp;rdquo; strategy, Fleets will remove &lt;code&gt;Ready&lt;/code&gt; &lt;code&gt;GameServers&lt;/code&gt; from Nodes with the &lt;em&gt;least&lt;/em&gt; number of &lt;code&gt;Ready&lt;/code&gt; and
&lt;code&gt;Allocated&lt;/code&gt; &lt;code&gt;GameServers&lt;/code&gt; on them. Attempting to empty Nodes so that they can be safely removed.&lt;/p&gt;
&lt;h3 id=&#34;distributed&#34;&gt;Distributed&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/v1&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;kind&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Fleet&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;metadata&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;simple-game-server&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;replicas&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;100&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;scheduling&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Distributed&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;template&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;ports&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;containerPort&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;7654&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;template&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;containers&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;          &lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;simple-game-server&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;            &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;image&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This Fleet scheduling strategy is designed for static Kubernetes environments, such as when you are running Kubernetes
on bare metal, and the cluster size rarely changes, if at all.&lt;/p&gt;
&lt;p&gt;This attempts to distribute the load across the entire cluster as much as possible, to take advantage of the static
size of the cluster.&lt;/p&gt;


&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;

    &lt;p&gt;&lt;code&gt;Distributed&lt;/code&gt; scheduling does not set
a &lt;a href=&#34;https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature&#34;&gt;&lt;code&gt;PodAffinity&lt;/code&gt;&lt;/a&gt;
on &lt;code&gt;GameServer&lt;/code&gt; &lt;code&gt;Pods&lt;/code&gt;, and instead assumes that the default scheduler for your cluster will distribute the
&lt;code&gt;GameServer&lt;/code&gt; &lt;code&gt;Pods&lt;/code&gt; across the cluster by default.&lt;/p&gt;
&lt;p&gt;If your default scheduler does not do this, you may wish to set your own &lt;code&gt;PodAffinity&lt;/code&gt; to spread the load across the
cluster, or update the default scheduler to provide this functionality.&lt;/p&gt;


&lt;/div&gt;

&lt;p&gt;This affects Allocation Scheduling, Pod Scheduling and Fleet Scale Down Scheduling.&lt;/p&gt;
&lt;h4 id=&#34;cluster-autoscaler-2&#34;&gt;Cluster Autoscaler&lt;/h4&gt;
&lt;p&gt;Since this strategy is not aimed at clusters that autoscale, this strategy does nothing for the cluster autoscaler.&lt;/p&gt;
&lt;h4 id=&#34;allocation-scheduling-strategy-1&#34;&gt;Allocation Scheduling Strategy&lt;/h4&gt;
&lt;p&gt;Under the &amp;ldquo;Distributed&amp;rdquo; strategy, allocation will prioritise allocating &lt;code&gt;GameServers&lt;/code&gt; to nodes that have the least
number of allocated &lt;code&gt;GameServers&lt;/code&gt; on them.&lt;/p&gt;
&lt;h4 id=&#34;pod-scheduling-strategy-1&#34;&gt;Pod Scheduling Strategy&lt;/h4&gt;
&lt;p&gt;Under the &amp;ldquo;Distributed&amp;rdquo; strategy, &lt;code&gt;Pod&lt;/code&gt; scheduling is provided by the default Kubernetes scheduler, which will attempt
to distribute the &lt;code&gt;GameServer&lt;/code&gt; &lt;code&gt;Pods&lt;/code&gt; across as many nodes as possible.&lt;/p&gt;
&lt;h4 id=&#34;fleet-scale-down-strategy-2&#34;&gt;Fleet Scale Down Strategy&lt;/h4&gt;
&lt;p&gt;With the &amp;ldquo;Distributed&amp;rdquo; strategy, Fleets will remove &lt;code&gt;Ready&lt;/code&gt; &lt;code&gt;GameServers&lt;/code&gt; from Nodes with at random, to ensure
a distributed load is maintained.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: High Availability Agones</title>
      <link>/site/docs/advanced/high-availability-agones/</link>
      <pubDate>Fri, 10 Feb 2023 00:00:00 +0000</pubDate>
      
      <guid>/site/docs/advanced/high-availability-agones/</guid>
      <description>
        
        
        &lt;h2 id=&#34;high-availability-for-agones-controller&#34;&gt;High Availability for Agones Controller&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;agones-controller&lt;/code&gt; responsibility is split up into &lt;code&gt;agones-controller&lt;/code&gt;, which enacts the Agones control loop, and &lt;code&gt;agones-extensions&lt;/code&gt;, which acts as a service endpoint for webhooks and the allocation extension API. Splitting these responsibilities allows the &lt;code&gt;agones-extensions&lt;/code&gt; pod to be &lt;strong&gt;horizontally scaled&lt;/strong&gt;, making the Agones control plane &lt;strong&gt;highly available&lt;/strong&gt; and more &lt;strong&gt;resiliant to disruption&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;agones-controller&lt;/code&gt; pods enabled, with a primary controller selected via leader election. Having multiple &lt;code&gt;agones-controller&lt;/code&gt; minimizes downtime of the service from pod disruptions such as deployment updates, autoscaler evictions, and crashes.&lt;/p&gt;
&lt;h2 id=&#34;extension-pod-configrations&#34;&gt;Extension Pod Configrations&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;agones-extensions&lt;/code&gt; binary has a similar &lt;code&gt;helm&lt;/code&gt; configuration to &lt;code&gt;agones-controller&lt;/code&gt;, see &lt;a href=&#34;/site/site/docs/installation/install-agones/helm/&#34;&gt;here&lt;/a&gt;. If you previously overrode &lt;code&gt;agones.controller.*&lt;/code&gt; settings, you may need to override the same &lt;code&gt;agones.extensions.*&lt;/code&gt; setting.&lt;/p&gt;
&lt;p&gt;To change &lt;code&gt;controller.numWorkers&lt;/code&gt; to 200 from 100 values and through the use of &lt;code&gt;helm --set&lt;/code&gt;, add the follow to the &lt;code&gt;helm&lt;/code&gt; command:&lt;/p&gt;


&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;


    Important: This will not have any effect on any &lt;code&gt;extensions&lt;/code&gt; values!

&lt;/div&gt;

&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt; ...
 --set agones.controller.numWorkers=200
 ...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;An important configuration to note is the PodDisruptionBudget fields, &lt;code&gt;agones.extensions.pdb.minAvailable&lt;/code&gt; and &lt;code&gt;agones.extensions.pdb.maxUnavailable&lt;/code&gt;. Currently, the &lt;code&gt;agones.extensions.pdb.minAvailable&lt;/code&gt; field is set to 1.&lt;/p&gt;
&lt;h2 id=&#34;deployment-considerations&#34;&gt;Deployment Considerations&lt;/h2&gt;
&lt;p&gt;Leader election will automatically be enabled and &lt;code&gt;agones.controller.replicas&lt;/code&gt; is &amp;gt; 1. &lt;a href=&#34;/site/site/docs/installation/install-agones/helm/#configuration&#34;&gt;&lt;code&gt;agones.controller.replicas&lt;/code&gt;&lt;/a&gt; defaults to 2.&lt;/p&gt;
&lt;p&gt;The default configuration now deploys 2 &lt;code&gt;agones-controller&lt;/code&gt; pods and 2 &lt;code&gt;agones-extensions&lt;/code&gt; pods, replacing the previous single &lt;code&gt;agones-controller&lt;/code&gt; pod setup. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;NAME                                 READY   STATUS    RESTARTS   AGE
agones-allocator-78c6b8c79-h9nqc     1/1     Running   0          23h
agones-allocator-78c6b8c79-l2bzp     1/1     Running   0          23h
agones-allocator-78c6b8c79-rw75j     1/1     Running   0          23h
agones-controller-fbf944f4-vs9xx     1/1     Running   0          23h
agones-controller-fbf944f4-sjk3t     1/1     Running   0          23h
agones-extensions-5648fc7dcf-hm6lk   1/1     Running   0          23h
agones-extensions-5648fc7dcf-qbc6h   1/1     Running   0          23h
agones-ping-5b9647874-2rrl6          1/1     Running   0          27h
agones-ping-5b9647874-rksgg          1/1     Running   0          27h
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The number of replicas for &lt;code&gt;agones-extensions&lt;/code&gt; can be set using helm variable &lt;a href=&#34;/site/site/docs/installation/install-agones/helm/#configuration&#34;&gt;&lt;code&gt;agones.extensions.replicas&lt;/code&gt;&lt;/a&gt;, but the default is &lt;code&gt;2&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;We expect the aggregate memory consumption of the pods will be slightly higher than the previous singleton pod, but as the responsibilities are now split across the pods, the aggregate CPU consumption should also be similar.&lt;/p&gt;
&lt;h2 id=&#34;feature-design&#34;&gt;Feature Design&lt;/h2&gt;
&lt;p&gt;Please see &lt;a href=&#34;https://github.com/googleforgames/agones/issues/2797&#34;&gt;HA Agones&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Controlling Disruption</title>
      <link>/site/docs/advanced/controlling-disruption/</link>
      <pubDate>Tue, 24 Jan 2023 20:15:26 +0000</pubDate>
      
      <guid>/site/docs/advanced/controlling-disruption/</guid>
      <description>
        
        
        &lt;h2 id=&#34;disruption-in-kubernetes&#34;&gt;Disruption in Kubernetes&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#voluntary-and-involuntary-disruptions&#34;&gt;A &lt;code&gt;Pod&lt;/code&gt; in Kubernetes may be disrupted&lt;/a&gt; for involuntary reasons, e.g. hardware failure, or voluntary reasons, such as when nodes are drained for upgrades.&lt;/p&gt;
&lt;p&gt;By default, Agones assumes your game server should never be disrupted voluntarily and configures the &lt;code&gt;Pod&lt;/code&gt; appropriately - but this isn&amp;rsquo;t always the ideal setting. Here we discuss how Agones allows you to control the two most significant sources of voluntary &lt;code&gt;Pod&lt;/code&gt; evictions, node upgrades and Cluster Autoscaler, using the &lt;code&gt;eviction&lt;/code&gt; API on the &lt;code&gt;GameServer&lt;/code&gt; object.&lt;/p&gt;
&lt;h2 id=&#34;benefits-of-allowing-voluntary-disruption&#34;&gt;Benefits of Allowing Voluntary Disruption&lt;/h2&gt;
&lt;p&gt;It&amp;rsquo;s not always easy to write your game server in a way that allows for disruption, but it can have major benefits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Compaction of your cluster using &lt;a href=&#34;https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler&#34;&gt;Cluster Autoscaler&lt;/a&gt; can lead to considerable cost savings for your infrastructure.&lt;/li&gt;
&lt;li&gt;Allowing automated node upgrades can save you management toil, and lowers the time it takes to patch security vulnerabilites.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;considerations&#34;&gt;Considerations&lt;/h2&gt;
&lt;p&gt;When discussing game server pod disruption, it&amp;rsquo;s important to keep two factors in mind:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;TERM&lt;/code&gt; signal:&lt;/strong&gt; Is your game server tolerant of graceful termination? If you wish to support voluntary disruption, your game server must handle the &lt;code&gt;TERM&lt;/code&gt; signal (even if it runs to completion after receiving &lt;code&gt;TERM&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Termination Grace Period:&lt;/strong&gt; After receiving &lt;code&gt;TERM&lt;/code&gt;, how long does your game server need to run? If you run to completion after receiving &lt;code&gt;TERM&lt;/code&gt;, this is equivalent to the session length - if not, you can think of this as the cleanup time. In general, we bucket the grace period into &amp;ldquo;less than 10 minutes&amp;rdquo;, &amp;ldquo;10 minutes to an hour&amp;rdquo;, and &amp;ldquo;greater than an hour&amp;rdquo;. (See &lt;a href=&#34;#whats-special-about-ten-minutes-and-one-hour&#34;&gt;below&lt;/a&gt; if you are curious about grace period considerations.)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;eviction-api&#34;&gt;&lt;code&gt;eviction&lt;/code&gt; API&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;eviction&lt;/code&gt; API is specified as part of the &lt;code&gt;GameServerSpec&lt;/code&gt;, like:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/v1&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;kind&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;GameServer&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;metadata&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;simple-game-server&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;eviction&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;safe&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Always&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;template&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;...]&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can set &lt;code&gt;eviction.safe&lt;/code&gt; based on your game server&amp;rsquo;s tolerance for disruption and session length, based on the following diagram:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../diagrams/eviction-decision.dot.png&#34; alt=&#34;Eviction Decision Diagram&#34;&gt;&lt;/p&gt;
&lt;p&gt;In words:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Does the game server support &lt;code&gt;TERM&lt;/code&gt; and terminate within ten minutes?
&lt;ul&gt;
&lt;li&gt;Yes to both: Set &lt;code&gt;safe: Always&lt;/code&gt;, and set &lt;a href=&#34;https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#hook-handler-execution&#34;&gt;terminationGracePeriodSeconds&lt;/a&gt; to the session length or cleanup time.&lt;/li&gt;
&lt;li&gt;No to either: Does the game server support &lt;code&gt;TERM&lt;/code&gt; and terminate within an hour?
&lt;ul&gt;
&lt;li&gt;Yes to both: Set &lt;code&gt;safe: OnUpgrade&lt;/code&gt;, and configure &lt;a href=&#34;https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#hook-handler-execution&#34;&gt;terminationGracePeriodSeconds&lt;/a&gt; to the session length or cleanup time.&lt;/li&gt;
&lt;li&gt;No to either: Set &lt;code&gt;safe: Never&lt;/code&gt;. If your game server does not terminate within an hour, see &lt;a href=&#34;#considerations-for-long-sessions&#34;&gt;below&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;

    To maintain backward compatibility with Agones prior to the introduction of &lt;code&gt;eviction&lt;/code&gt; API, if your game server previously configured the &lt;code&gt;cluster-autoscaler.kubernetes.io/safe-to-evict: true&lt;/code&gt; annotation, we assume &lt;code&gt;eviction.safe: Always&lt;/code&gt; is intended.

&lt;/div&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;

    GKE Autopilot supports only &lt;code&gt;Never&lt;/code&gt; and &lt;code&gt;Always&lt;/code&gt;, not &lt;code&gt;OnUpgrade&lt;/code&gt;.

&lt;/div&gt;

&lt;h2 id=&#34;whats-special-about-ten-minutes-and-one-hour&#34;&gt;What&amp;rsquo;s special about ten minutes and one hour?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Ten minutes:&lt;/strong&gt; Cluster Autoscaler respects &lt;a href=&#34;https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#does-ca-respect-gracefultermination-in-scale-down&#34;&gt;ten minutes of graceful termination&lt;/a&gt; on scale-down. On some cloud products, you can configure &lt;code&gt;--max-graceful-termination-sec&lt;/code&gt; to change this, but it is not advised: Cluster Autoscaler is currently only capable of scaling down one node at a time, and larger graceful termination windows slow this down farther (see &lt;a href=&#34;https://github.com/kubernetes/autoscaler/issues/5079&#34;&gt;autoscaler#5079&lt;/a&gt;). If the ten minute limit does not apply to you, generally you should choose between &lt;code&gt;safe: Always&lt;/code&gt; (for sessions less than an hour), or see &lt;a href=&#34;#considerations-for-long-sessions&#34;&gt;below&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;One hour:&lt;/strong&gt; On many cloud products, &lt;code&gt;PodDisruptionBudget&lt;/code&gt; can only block node upgrade evictions for a certain period of time - on GKE this is 1h. After that, the PDB is ignored, or the node upgrade fails with an error. Controlling &lt;code&gt;Pod&lt;/code&gt; disruption for longer than one hour requires cluster configuration changes outside of Agones - see &lt;a href=&#34;#considerations-for-long-sessions&#34;&gt;below&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;considerations-for-long-sessions&#34;&gt;Considerations for long sessions&lt;/h2&gt;
&lt;p&gt;Outside of Cluster Autoscaler, the main source of disruption for long sessions is node upgrade. On some cloud products, such as GKE Standard, node upgrades are entirely within your control. On others, such as GKE Autopilot, node upgrade is automatic. Typical node upgrades use an eviction based, rolling recreate strategy, and may not honor &lt;code&gt;PodDisruptionBudget&lt;/code&gt; for longer than an hour. See &lt;a href=&#34;/site/site/docs/guides/best-practices/&#34;&gt;Best Practices&lt;/a&gt; for information specific to your cloud product.&lt;/p&gt;
&lt;h2 id=&#34;implementation--under-the-hood&#34;&gt;Implementation / Under the hood&lt;/h2&gt;
&lt;p&gt;Each option uses a slightly different permutation of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the &lt;code&gt;safe-to-evict&lt;/code&gt; annotation to block &lt;a href=&#34;https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-types-of-pods-can-prevent-ca-from-removing-a-node&#34;&gt;Cluster Autoscaler based eviction&lt;/a&gt;, and&lt;/li&gt;
&lt;li&gt;the &lt;code&gt;agones.dev/safe-to-evict&lt;/code&gt; label selector to select the &lt;code&gt;agones-gameserver-safe-to-evict-false&lt;/code&gt; &lt;code&gt;PodDisruptionBudget&lt;/code&gt;. This blocks &lt;a href=&#34;https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-types-of-pods-can-prevent-ca-from-removing-a-node&#34;&gt;Cluster Autoscaler&lt;/a&gt; and (for a limited time) &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets&#34;&gt;disruption from node upgrades&lt;/a&gt;.
&lt;ul&gt;
&lt;li&gt;Note that PDBs do influence pod preemption as well, but it&amp;rsquo;s not guaranteed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As a quick reference:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;evictions.safe setting&lt;/th&gt;
&lt;th&gt;&lt;code&gt;safe-to-evict&lt;/code&gt; pod annotation&lt;/th&gt;
&lt;th&gt;&lt;code&gt;agones.dev/safe-to-evict&lt;/code&gt; label&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Never&lt;/code&gt; (default)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt; (matches PDB)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;OnUpgrade&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt; (does not match PDB)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Always&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt; (does not match PDB)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;further-reading&#34;&gt;Further Reading&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/googleforgames/agones/issues/2794&#34;&gt;&lt;code&gt;eviction&lt;/code&gt; design&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Limiting CPU &amp; Memory</title>
      <link>/site/docs/advanced/limiting-resources/</link>
      <pubDate>Thu, 03 Jan 2019 05:45:15 +0000</pubDate>
      
      <guid>/site/docs/advanced/limiting-resources/</guid>
      <description>
        
        
        &lt;p&gt;As a short description:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CPU &lt;code&gt;Requests&lt;/code&gt; are limits that are applied when there is CPU congestion, and as such can burst above their set limits.&lt;/li&gt;
&lt;li&gt;CPU &lt;code&gt;Limits&lt;/code&gt; are hard limits on how much CPU time the particular container gets access to.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is useful for game servers, not just as a mechanism to distribute compute resources evenly, but also as a way
to advice the Kubernetes scheduler how many game server processes it is able to fit into a given node in the cluster.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s worth reading the &lt;a href=&#34;https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/&#34;&gt;Managing Compute Resources for Containers&lt;/a&gt;
Kubernetes documentation for more details on &amp;ldquo;requests&amp;rdquo; and &amp;ldquo;limits&amp;rdquo; to both CPU and Memory, and how to configure them.&lt;/p&gt;
&lt;h2 id=&#34;gameservers&#34;&gt;GameServers&lt;/h2&gt;
&lt;p&gt;Since the &lt;code&gt;GameServer&lt;/code&gt; specification provides a full &lt;a href=&#34;https://v1-27.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core&#34;&gt;&lt;code&gt;PodSpecTemplate&lt;/code&gt;&lt;/a&gt;,
we can take advantage of both resource limits and requests in our &lt;code&gt;GameServer&lt;/code&gt; configurations.&lt;/p&gt;
&lt;p&gt;For example, to set a CPU limit on our &lt;code&gt;GameServer&lt;/code&gt; configuration of &lt;code&gt;250m/0.25&lt;/code&gt; of a CPU,
we could do so as followed:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/v1&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;kind&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;GameServer&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;metadata&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;simple-game-server&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;ports&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;default&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;containerPort&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;7654&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;template&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;containers&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;simple-game-server&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;image&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;resources&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;limits&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;            &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;cpu&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;250m&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;#this is our limit here&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you do not set a limit or request, the default is set by Kubernetes at a 100m CPU request.&lt;/p&gt;
&lt;h2 id=&#34;sdk-gameserver-sidecar&#34;&gt;SDK GameServer sidecar&lt;/h2&gt;
&lt;p&gt;You may also want to tweak the CPU request or limits on the SDK &lt;code&gt;GameServer&lt;/code&gt; sidecar process that spins up alongside
each game server container.&lt;/p&gt;
&lt;p&gt;You can do this through the &lt;a href=&#34;/site/site/docs/installation/install-agones/helm/&#34;&gt;Helm configuration&lt;/a&gt; when installing Agones.&lt;/p&gt;
&lt;p&gt;By default, this is set to having a CPU request value of 30m, with no hard CPU limit. This ensures that the sidecar always has enough CPU
to function, but it is configurable in case a lower, or higher value is required on your clusters, or if you desire
hard limit.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Out of Cluster Dev Server</title>
      <link>/site/docs/advanced/out-of-cluster-dev-server/</link>
      <pubDate>Sat, 22 Jul 2023 17:21:25 +0000</pubDate>
      
      <guid>/site/docs/advanced/out-of-cluster-dev-server/</guid>
      <description>
        
        
        &lt;p&gt;This section builds upon the topics discussed in &lt;a href=&#34;/site/site/docs/guides/client-sdks/local/&#34;&gt;local SDK Server&lt;/a&gt;, &lt;a href=&#34;/site/site/docs/guides/local-game-server/&#34;&gt;Local Game Server&lt;/a&gt;, and &lt;code&gt;GameServer&lt;/code&gt; allocation (discussed &lt;a href=&#34;/site/site/docs/integration-patterns/allocation-from-fleet/&#34;&gt;here&lt;/a&gt;, &lt;a href=&#34;/site/site/docs/reference/gameserverallocation/&#34;&gt;here&lt;/a&gt;, and &lt;a href=&#34;/site/site/docs/advanced/allocator-service/&#34;&gt;here&lt;/a&gt;).
Having a firm understanding of those concepts will be necessary for running an &amp;ldquo;out of cluster&amp;rdquo; local server.&lt;/p&gt;
&lt;p&gt;Running an &amp;ldquo;out of cluster&amp;rdquo; dev server combines the best parts of local debugging and being a part of a cluster.
A developer will be able to run a custom server binary on their local machine, even within an IDE with breakpoints.
The server would also be allocatable within a cluster, allowing integration with the project&amp;rsquo;s full stack for handling game server lifetime.&lt;/p&gt;
&lt;p&gt;For each run, the only manual steps required by the developer is to manually run the local SDK Server and to run their custom gameplay binary (each can easily be reused/restarted).
All other state progression will be automatically handled by the custom gameplay server (calling the SDK API), the SDK Server (handling the SDK calls), the cluster &lt;code&gt;GameServer&lt;/code&gt; Controller (progressing specific &lt;a href=&#34;/site/site/docs/reference/gameserver/#gameserver-state-diagram&#34;&gt;states&lt;/a&gt;), and the cluster&amp;rsquo;s allocation system (whether be through &lt;code&gt;GameServerAllocation&lt;/code&gt; or via the Allocator Service) &amp;ndash; just as it would when running in a pod in a cluster!&lt;/p&gt;
&lt;p&gt;Out of cluster development is a fantastic option during early prototyping, as it can (optionally) all be run on a single machine with tools such as &lt;a href=&#34;/site/site/docs/installation/creating-cluster/minikube/&#34;&gt;Minikube&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The name &amp;ldquo;out of cluster&amp;rdquo; is to contrast &lt;a href=&#34;https://pkg.go.dev/k8s.io/client-go/tools/clientcmd#InClusterConfig&#34;&gt;InClusterConfig&lt;/a&gt; which is used in the internal golang kubeconfig API.&lt;/p&gt;
&lt;h2 id=&#34;prerequisite-steps&#34;&gt;Prerequisite steps&lt;/h2&gt;
&lt;p&gt;To be able to run an &amp;ldquo;out of cluster&amp;rdquo; local game server, one needs to first complete a few prerequisite steps.&lt;/p&gt;
&lt;h3 id=&#34;cluster-created&#34;&gt;Cluster created&lt;/h3&gt;
&lt;p&gt;First, a cluster must have been created that the developer has access to through commands like &lt;code&gt;kubectl&lt;/code&gt;.
This cluster could be running on a provider or locally (e.g. on Minikube).
See &lt;a href=&#34;/site/site/docs/installation/creating-cluster/&#34;&gt;Create Kubernetes Cluster&lt;/a&gt; for more details on how to create a cluster, if not already done so.&lt;/p&gt;
&lt;h3 id=&#34;agones-gameserver-resource-created&#34;&gt;Agones &lt;code&gt;GameServer&lt;/code&gt; resource created&lt;/h3&gt;
&lt;p&gt;Out of cluster dev servers make use of &lt;a href=&#34;/site/site/docs/guides/local-game-server/&#34;&gt;local dev servers&lt;/a&gt;.
Follow the instructions there to create a &lt;code&gt;GameServer&lt;/code&gt; resource for use with a local game server.
Note that the &lt;code&gt;metadata:annotations:agones.dev/dev-address&lt;/code&gt; should be updated to point to the local machine, more details &lt;a href=&#34;#forwarded-ports&#34;&gt;below&lt;/a&gt; around port forwarding.&lt;/p&gt;
&lt;h3 id=&#34;sdk-server-available&#34;&gt;SDK Server available&lt;/h3&gt;
&lt;p&gt;An &amp;ldquo;out of cluster&amp;rdquo; dev server requires the need to also run the SDK Server locally.&lt;/p&gt;
&lt;p&gt;When a &lt;code&gt;GameServer&lt;/code&gt; runs normally in a prod-like environment, the Agones cluster controller will handle initializing the containers which contain the SDK Server and the game server binary.
The game server binary will be able to connect over gRPC to the SDK Server running in the sidecar container.
When the game server binary makes SDK calls (e.g. &lt;code&gt;SDK.Ready()&lt;/code&gt;), those get sent to the SDK Server via gRPC and the SDK Server as able to modify the &lt;code&gt;GameServer&lt;/code&gt; resource in the cluster.
When the &lt;code&gt;GameServer&lt;/code&gt; resource gets modified (either by the Agones cluster controller, by the Agones Allocation Service, or by the K8s API), the SDK Server is monitoring and sends update events over gRPC to the SDK API, resulting in a callback in the game server binary logic.&lt;/p&gt;
&lt;p&gt;The goal of an &amp;ldquo;out of cluster&amp;rdquo; dev server is to keep all this prod-like functionality, even in a debuggable context.
To do so, the developer must run the SDK Server locally such that the (also local) game server binary can connect via gRPC.
Instructions for downloading and running the SDK Server can be found &lt;a href=&#34;/site/site/docs/guides/client-sdks/local/&#34;&gt;here&lt;/a&gt;.
However, instead of using &lt;code&gt;--local&lt;/code&gt; or &lt;code&gt;--file&lt;/code&gt;, the SDK Server will need to be run in &amp;ldquo;out of cluster&amp;rdquo; mode by providing a kubeconfig file to connect to the cluster. This section is focusing on getting the SDK Server ready to run locally, more detail about running it can be found &lt;a href=&#34;#running-sdk-server-locally&#34;&gt;below&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;game-server-binary-available&#34;&gt;Game server binary available&lt;/h3&gt;
&lt;p&gt;When running Agones normally, the game server binary is inside a prebuilt docker image which is loaded into a container in a &lt;code&gt;GameServer&lt;/code&gt;&amp;rsquo;s pod.
This can either be a custom, developer-created, docker image and contained binary or a sample image/binary from an external source.
This document will use the sample &lt;code&gt;simple-game-server&lt;/code&gt;, which follows suit from various other documentation pages (e.g. &lt;a href=&#34;/site/site/docs/getting-started/create-gameserver/&#34;&gt;Quickstart: Create a Game Server&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;simple-game-server&lt;/code&gt; can be run from the docker image &lt;code&gt;us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31&lt;/code&gt;.
The game server binary can either be run within a docker container or run locally, so long as all ports are published/forward &amp;ndash; more on this &lt;a href=&#34;#forwarded-ports&#34;&gt;below&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Alternatively, the &lt;code&gt;simple-game-server&lt;/code&gt; can also be run from source code; see &lt;code&gt;examples/simple-game-server/main.go&lt;/code&gt;. More details about running from source can be found &lt;a href=&#34;/site/site/docs/guides/client-sdks/local/#running-from-source-code-instead-of-prebuilt-binary&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt; Agones is run and tested with the version of Go specified by the &lt;code&gt;GO_VERSION&lt;/code&gt; variable in the project&amp;rsquo;s &lt;a href=&#34;https://github.com/googleforgames/agones/blob/main/build/build-image/Dockerfile&#34;&gt;build Dockerfile&lt;/a&gt;. Other versions are not supported, but may still work.&lt;/p&gt;
&lt;p&gt;If a developer has their own game server logic, written in the language of their choice, that would be perfectly fine.
A custom game server can be similarly run within a docker container, run directly on commandline, or run via an IDE/debugger.&lt;/p&gt;
&lt;h3 id=&#34;forwarded-ports&#34;&gt;Forwarded Ports&lt;/h3&gt;
&lt;p&gt;As the game server binary will be run on the developer&amp;rsquo;s machine and a requesting client will attempt to connect to the game server via the &lt;code&gt;GameServer&lt;/code&gt;&amp;rsquo;s &lt;code&gt;metadata:annotations:agones.dev/dev-address&lt;/code&gt; and &lt;code&gt;spec:ports:hostPort&lt;/code&gt; fields, the developer needs to ensure that connection can take place.&lt;/p&gt;
&lt;p&gt;If the game server binary and the arbitrary connecting client logic are both on the same network, then connecting should work without any extra steps.
However, if the developer has a more complicated network configuration or if they are attempting to connect over the public internet, extra steps may be required.&lt;/p&gt;
&lt;p&gt;Obviously, this document does not know what every developer&amp;rsquo;s specific network configuration is, how their custom game client(s) work, their development environment, and/or various other factors.
The developer will need to figure out which steps are necessary for their specific configuration.&lt;/p&gt;
&lt;p&gt;If attempting to connect via the internet, the developer needs to set the &lt;code&gt;GameServer&lt;/code&gt;&amp;rsquo;s &lt;code&gt;metadata:annotations:agones.dev/dev-address&lt;/code&gt; field to their public IP.
This can be found by going to &lt;a href=&#34;https://www.whatsmyip.org/&#34;&gt;whatsmyip.org&lt;/a&gt; or &lt;a href=&#34;https://www.whatismyip.com/&#34;&gt;whatismyip.com&lt;/a&gt; in a web browser.&lt;/p&gt;
&lt;p&gt;The  &lt;code&gt;GameServer&lt;/code&gt;&amp;rsquo;s &lt;code&gt;spec:ports:hostPort&lt;/code&gt;/&lt;code&gt;spec:ports:containerPort&lt;/code&gt; should be set to whichever port the game server binary&amp;rsquo;s logic will bind to &amp;ndash; the port used by &lt;code&gt;simple-game-server&lt;/code&gt; is 7654 (by default).
The local network&amp;rsquo;s router must also be configured to forward this port to the desired machine; allowing inbound external requests (from the internet) to be directed to the machine on the network that is running the game server.&lt;/p&gt;
&lt;p&gt;If the SDK Server is run on the same machine as the game server binary, no extra steps are necessary for the two to connect.
By default, the SDK API (in the game server binary) will attempt to gRPC connect to the SDK Server on &lt;code&gt;localhost&lt;/code&gt; on the port &lt;code&gt;9357&lt;/code&gt;.
If the SDK Server is run on another machine, or if the SDK Server is set to use different ports (e.g. via commandline arguments), the developer will need to also take appropriate steps to ensure that the game server can connect to the SDK Server.
As discussed &lt;a href=&#34;#running-sdk-server-locally&#34;&gt;further below&lt;/a&gt; running the SDK Server with &lt;code&gt;--address 0.0.0.0&lt;/code&gt; can be quite helpful with various setups.&lt;/p&gt;
&lt;p&gt;If the developer is running the SDK Server or the game server binary within docker container(s), then publishing ports and/or connecting to a docker network may be necessary.
Again, these configurations can vary quite dramatically and the developer will need to find the necessary steps for their specific setup.&lt;/p&gt;
&lt;h2 id=&#34;running-out-of-cluster-local-game-server&#34;&gt;Running &amp;ldquo;out of cluster&amp;rdquo; local game server&lt;/h2&gt;
&lt;p&gt;Now that all prerequisite steps have been completed, the developer should have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a &lt;a href=&#34;#cluster-created&#34;&gt;cluster&lt;/a&gt; with a configured &lt;a href=&#34;#agones-gameserver-resource-created&#34;&gt;&lt;code&gt;GameServer&lt;/code&gt; resource&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;the &lt;a href=&#34;#sdk-server-available&#34;&gt;SDK Server&lt;/a&gt; ready to run.&lt;/li&gt;
&lt;li&gt;a &lt;a href=&#34;#game-server-binary-available&#34;&gt;game server binary&lt;/a&gt; ready to run.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;optional-gameserver-state-monitoring&#34;&gt;Optional &lt;code&gt;GameServer&lt;/code&gt; state monitoring&lt;/h3&gt;
&lt;p&gt;A helpful (optional) step to see progress when running is to watch the &lt;code&gt;GameServer&lt;/code&gt; resource.&lt;/p&gt;
&lt;p&gt;This can be done with the command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get --watch -n default gs my-local-server
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It may be necessary to replace &lt;code&gt;default&lt;/code&gt; and &lt;code&gt;my-local-server&lt;/code&gt; with whichever namespace/name values are used by the dev &lt;code&gt;GameServer&lt;/code&gt; created &lt;a href=&#34;#agones-gameserver-resource-created&#34;&gt;above&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;With this command running, the terminal will automatically show updates to the &lt;code&gt;GameServer&lt;/code&gt;&amp;rsquo;s state &amp;ndash; however, this is not necessary to proceed.&lt;/p&gt;
&lt;h3 id=&#34;running-sdk-server-locally&#34;&gt;Running SDK Server locally&lt;/h3&gt;
&lt;p&gt;The first step is to run the SDK Server, making it available for the (later run) game server binary to connect.
Here is a sample command to run the SDK Server, with each argument discussed after.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./sdk-server.linux.amd64 &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;  --gameserver-name my-local-server &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;  --pod-namespace default &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;  --kubeconfig &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$HOME&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;/.kube/config&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;  --address 0.0.0.0 &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;  --graceful-termination &lt;span style=&#34;color:#204a87&#34;&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--gameserver-name&lt;/code&gt; is a necessary arg, passed instead of the &lt;code&gt;GAMESERVER_NAME&lt;/code&gt; enviroment variable.
&lt;ul&gt;
&lt;li&gt;It is set to the name of the dev &lt;code&gt;GameServer&lt;/code&gt; k8s resource.&lt;/li&gt;
&lt;li&gt;It tells the SDK Sever which resource to read/write to on the k8s cluster.&lt;/li&gt;
&lt;li&gt;This example value of &lt;code&gt;my-local-server&lt;/code&gt; matches to the instructions for setting up a &lt;a href=&#34;/site/site/docs/guides/local-game-server/&#34;&gt;Local Game Server&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--pod-namespace&lt;/code&gt; is a necessary arg, passed instead of the &lt;code&gt;POD_NAMESPACE&lt;/code&gt; enviroment variable.
&lt;ul&gt;
&lt;li&gt;It is set set to the namespace which the dev &lt;code&gt;GameServer&lt;/code&gt; resides in.&lt;/li&gt;
&lt;li&gt;It tells the SDK Sever which namespace to look under for the &lt;code&gt;GameServer&lt;/code&gt; to read/write to on the k8s cluster.&lt;/li&gt;
&lt;li&gt;This example value of &lt;code&gt;default&lt;/code&gt; is used as most instructions in this documentation assumes &lt;code&gt;GameServers&lt;/code&gt; to be created in the &lt;code&gt;default&lt;/code&gt; namespace.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--kubeconfig&lt;/code&gt; tells the SDK Server how to connect to the k8s cluster.
&lt;ul&gt;
&lt;li&gt;This actually does not trigger any special flow (unlike &lt;code&gt;--local&lt;/code&gt; or &lt;code&gt;--file&lt;/code&gt;).
The SDK Server will run just as it would when created in a sidecar container in a k8s cluster.&lt;/li&gt;
&lt;li&gt;Passing this argument simply provides where to connect along with the credentials to do so.&lt;/li&gt;
&lt;li&gt;This example value of &lt;code&gt;&amp;quot;$HOME/.kube/config&amp;quot;&lt;/code&gt; is the default location for k8s authentication information. This requires the developer be logged in via &lt;code&gt;kubectl&lt;/code&gt; and have the desired cluster selected via &lt;a href=&#34;https://jamesdefabia.github.io/docs/user-guide/kubectl/kubectl_config_use-context/&#34;&gt;&lt;code&gt;kubectl config use-context&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--address&lt;/code&gt; specifies the binding IP address for the SDK Server&amp;rsquo;s SDK API.
&lt;ul&gt;
&lt;li&gt;By default, the binding address is &lt;code&gt;localhost&lt;/code&gt;. This may be difficult for some development setups.&lt;/li&gt;
&lt;li&gt;Overriding this value changes which IP address(es) the server will bind to for receiving gRPC/REST SDK API calls.&lt;/li&gt;
&lt;li&gt;This example value of &lt;code&gt;0.0.0.0&lt;/code&gt; sets the SDK Server to receive API calls that are sent to any IP address (that reach the machine).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--graceful-termination&lt;/code&gt; set to false will disable some smooth state transitions when exiting.
&lt;ul&gt;
&lt;li&gt;By default, the SDK Server will wait until the &lt;code&gt;GameServer&lt;/code&gt; has reached the &lt;code&gt;Shutdown&lt;/code&gt; state before exiting (&amp;ldquo;graceful termination&amp;rdquo;).&lt;/li&gt;
&lt;li&gt;This will cause the SDK Server to hang (waiting on state update) when attempting to terminate (e.g. with &lt;code&gt;^C&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;When running binaries in a development context, quickly exiting and restarting the SDK Server is handy.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This can easily be terminated with &lt;code&gt;^C&lt;/code&gt; and restarted as necessary.
Note that terminating the SDK Server while the game server binary (discussed in the &lt;a href=&#34;#running-game-server-binary-locally&#34;&gt;next section&lt;/a&gt;) is using it may result in failure to update/watch &lt;code&gt;GameServer&lt;/code&gt; state and may result in a runtime error in the game server binary.&lt;/p&gt;
&lt;h3 id=&#34;running-game-server-binary-locally&#34;&gt;Running game server binary locally&lt;/h3&gt;
&lt;p&gt;Now that the SDK Server is running locally with k8s credentials, the game server binary can run in an integrated fashion.
The game server binary&amp;rsquo;s SDK calls will reach the local SDK Server, which will then interact with the &lt;code&gt;GameServer&lt;/code&gt; resource on the k8s cluster.&lt;/p&gt;
&lt;p&gt;Again, this document will make use of &lt;code&gt;simple-game-server&lt;/code&gt; via its docker image, but running directly or use of a custom game server binary is just as applicable.
Run the game server binary with the command:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;docker run --rm --network=&amp;#34;host&amp;#34; us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;--rm&lt;/code&gt; flag will nicely autoclean up the docker container after exiting.
The &lt;code&gt;--network=&amp;quot;host&amp;quot;&lt;/code&gt; flag will tell the docker container to use the host&amp;rsquo;s network stack directly; this allows calls to &lt;code&gt;localhost&lt;/code&gt; to reach the SDK Server.
The commands and flags used will likely differ if running a custom game server binary.&lt;/p&gt;
&lt;p&gt;If the earlier &lt;code&gt;kubectl get --watch&lt;/code&gt; command was run, it will now show the &lt;code&gt;GameServer&lt;/code&gt; progressed to the &lt;code&gt;RequestReady&lt;/code&gt; state, which will automatically be progressed to the &lt;code&gt;Ready&lt;/code&gt; state by the Agones controller on the cluster.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;GameServer&lt;/code&gt; state can further be modified by SDK calls, gRPC/REST calls, allocation via either &lt;a href=&#34;/site/site/docs/reference/gameserverallocation/&#34;&gt;&lt;code&gt;GameServerAllocation&lt;/code&gt;&lt;/a&gt; or &lt;a href=&#34;/site/site/docs/advanced/allocator-service/&#34;&gt;Allocator Service&lt;/a&gt;, K8s API calls, etc.
These changes will be shown by the &lt;code&gt;kubectl get --watch&lt;/code&gt; command.
These changes will also be picked up by the game server binary, if there is a listener registered through the SDK API.
This means that this &lt;code&gt;GameServer&lt;/code&gt; can be allocated just as it would be when running completely on k8s, but it can be locally debugged.&lt;/p&gt;
&lt;p&gt;If the server crashes or is killed by the developer, it can easily be restarted.
This can be done without restarting the SDK Server or any other manual intevention with the &lt;code&gt;GameServer&lt;/code&gt; resource.
Naturally, this may have implications on any connected clients, but that is project specific and left to the developer to handle.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Allocator Service</title>
      <link>/site/docs/advanced/allocator-service/</link>
      <pubDate>Tue, 19 May 2020 05:45:05 +0000</pubDate>
      
      <guid>/site/docs/advanced/allocator-service/</guid>
      <description>
        
        
        &lt;p&gt;To allocate a game server, Agones provides a gRPC and REST service with mTLS authentication, called &lt;code&gt;agones-allocator&lt;/code&gt; that can be used instead of 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/pkg/apis/allocation/v1/gameserverallocation.go&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;GameServerAllocations&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;Both gRPC and REST are accessible through a Kubernetes service that can be externalized using a load balancer. By default, gRPC and REST are served from the same port. However, either service can be disabled or the services can be served from separate ports using the &lt;a href=&#34;/site/site/docs/installation/install-agones/helm/&#34;&gt;helm configuration&lt;/a&gt;.&lt;/p&gt;


&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Warning&lt;/h4&gt;

    &lt;p&gt;If gRPC and REST are served using the same port, then an http multi-plexer is used along with an &lt;a href=&#34;https://github.com/grpc/grpc-go/blob/2608e38e6386be7400720fecf2ece176c4cbc1b2/server.go#L933-L960&#34;&gt;experimental gRPC server&lt;/a&gt; which has &lt;a href=&#34;https://github.com/grpc/grpc-go/issues/586#issuecomment-286257439&#34;&gt;noticeably worse performance&lt;/a&gt; than using the standard gRPC server.&lt;/p&gt;
&lt;p&gt;If you require a fully compatible or feature compatible gRPC server implementation, you must separate the gRPC port from the REST port or disable the REST service.&lt;/p&gt;


&lt;/div&gt;

&lt;p&gt;For requests to either service to succeed, a client certificate must be provided that is in the authorization list of the allocator service.
The remainder of this article describes how to manually make a successful allocation request using the API.&lt;/p&gt;
&lt;p&gt;The guide assumes you have command line tools installed for &lt;a href=&#34;https://stedolan.github.io/jq/&#34;&gt;jq&lt;/a&gt;, &lt;a href=&#34;https://golang.org/&#34;&gt;go&lt;/a&gt; and &lt;a href=&#34;https://www.openssl.org/&#34;&gt;openssl&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;gameserverallocation-vs-allocator-service&#34;&gt;&lt;code&gt;GameServerAllocation&lt;/code&gt; vs Allocator Service&lt;/h2&gt;
&lt;p&gt;There are several reasons you may prefer to use the Allocator Service over the &lt;code&gt;GameServerAllocation&lt;/code&gt; custom resource
definition, depending on your architecture and requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A requirement to do &lt;a href=&#34;/site/site/docs/advanced/multi-cluster-allocation/&#34;&gt;multi-cluster allocation&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Want to create Allocations from outside the Agones Kubernetes cluster.&lt;/li&gt;
&lt;li&gt;Prefer SSL based authentication over Kubernetes &lt;a href=&#34;https://kubernetes.io/docs/reference/access-authn-authz/rbac/&#34;&gt;RBAC&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Prefer a &lt;a href=&#34;https://grpc.github.io/&#34;&gt;gRPC&lt;/a&gt; or REST based API over an integration with the
&lt;a href=&#34;/site/site/docs/guides/access-api/&#34;&gt;Kubernetes API&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;find-the-external-ip&#34;&gt;Find the external IP&lt;/h2&gt;
&lt;p&gt;The service is hosted under the same namespace as the Agones controller. To find the external IP of your allocator service, replace agones-system namespace with the namespace to which Agones is deployed and execute the following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get service agones-allocator -n agones-system
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The output of the command should look like:&lt;/p&gt;
&lt;pre&gt;
NAME                        TYPE           CLUSTER-IP      &lt;b&gt;EXTERNAL-IP&lt;/b&gt;     PORT(S)            AGE
agones-allocator            LoadBalancer   10.55.251.73    &lt;b&gt;34.82.195.204&lt;/b&gt;   443:30250/TCP      7d22h
&lt;/pre&gt;
&lt;h2 id=&#34;server-tls-certificate&#34;&gt;Server TLS certificate&lt;/h2&gt;
&lt;p&gt;If the &lt;code&gt;agones-allocator&lt;/code&gt; service is installed as a &lt;code&gt;LoadBalancer&lt;/code&gt; &lt;a href=&#34;/site/site/docs/installation/install-agones/helm/#reserved-allocator-load-balancer-ip&#34;&gt;using a reserved IP&lt;/a&gt;, a valid self-signed server TLS certificate is generated using the IP provided. Otherwise, the server TLS certificate should be replaced. If you installed Agones using &lt;a href=&#34;/site/site/docs/installation/install-agones/helm/&#34;&gt;helm&lt;/a&gt;, you can easily reconfigure the allocator service with a preset IP address by setting the &lt;code&gt;agones.allocator.service.loadBalancerIP&lt;/code&gt; parameter to the address that was automatically assigned to the service and &lt;code&gt;helm upgrade&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;EXTERNAL_IP&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;$(&lt;/span&gt;kubectl get services agones-allocator -n agones-system -o &lt;span style=&#34;color:#000&#34;&gt;jsonpath&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;{.status.loadBalancer.ingress[0].ip}&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;helm upgrade my-release agones/agones -n agones-system --wait &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;   --set agones.allocator.service.loadBalancerIP&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;EXTERNAL_IP&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;   ...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Warning&lt;/h4&gt;

    The parameter used to automatically
replace the certificate changed in Agones 1.18.0. If you are using an older
version of Agones you should pass the parameter
&lt;code&gt;agones.allocator.http.loadBalancerIP&lt;/code&gt; instead. If you need your script to work
with both older and newer versions of Agones, you can pass both parameters as
only one of them will effect the helm chart templates.

&lt;/div&gt;

&lt;p&gt;Another approach is to replace the default server TLS certificate with a certificate with CN and subjectAltName. There are multiple approaches to generate a certificate. Agones recommends using &lt;a href=&#34;https://cert-manager.io/&#34;&gt;cert-manager.io&lt;/a&gt; solution for cluster level certificate management.&lt;/p&gt;
&lt;p&gt;In order to use the cert-manager solution, first &lt;a href=&#34;https://cert-manager.io/docs/installation/kubernetes/&#34;&gt;install cert-manager&lt;/a&gt; on the cluster.
Then, &lt;a href=&#34;https://cert-manager.io/docs/configuration/&#34;&gt;configure&lt;/a&gt; an &lt;code&gt;Issuer&lt;/code&gt;/&lt;code&gt;ClusterIssuer&lt;/code&gt; resource and
last &lt;a href=&#34;https://cert-manager.io/docs/usage/certificate/&#34;&gt;configure&lt;/a&gt; a &lt;code&gt;Certificate&lt;/code&gt; resource to manage allocator-tls &lt;code&gt;Secret&lt;/code&gt;.
Make sure to configure the &lt;code&gt;Certificate&lt;/code&gt; based on your system&amp;rsquo;s requirements, including the validity &lt;code&gt;duration&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Here is an example of using a self-signed &lt;code&gt;ClusterIssuer&lt;/code&gt; for configuring allocator-tls &lt;code&gt;Secret&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Create a self-signed ClusterIssuer&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cat &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;lt;&amp;lt;EOF | kubectl apply -f -
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;apiVersion: cert-manager.io/v1
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;kind: ClusterIssuer
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;metadata:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  name: selfsigned
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;spec:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  selfSigned: {}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;EXTERNAL_IP&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;$(&lt;/span&gt;kubectl get services agones-allocator -n agones-system -o &lt;span style=&#34;color:#000&#34;&gt;jsonpath&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;{.status.loadBalancer.ingress[0].ip}&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# for EKS use hostname&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# HOST_NAME=$(kubectl get services agones-allocator -n agones-system -o jsonpath=&amp;#39;{.status.loadBalancer.ingress[0].hostname}&amp;#39;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Create a Certificate with IP for the allocator-tls secret&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cat &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;lt;&amp;lt;EOF | kubectl apply -f -
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;apiVersion: cert-manager.io/v1
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;kind: Certificate
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;metadata:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  name: allocator-tls
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  namespace: agones-system
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;spec:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  commonName: ${EXTERNAL_IP}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  ipAddresses:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;    - ${EXTERNAL_IP}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  secretName: allocator-tls
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  issuerRef:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;    name: selfsigned
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;    kind: ClusterIssuer
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Wait for the allocator-tls Secret&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sleep &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;TLS_CA_VALUE&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;$(&lt;/span&gt;kubectl get secret allocator-tls -n agones-system -ojsonpath&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;{.data.ca\.crt}&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Add ca.crt to the allocator-tls-ca Secret&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get secret allocator-tls-ca -o json -n agones-system &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; jq &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;.data[&amp;#34;tls-ca.crt&amp;#34;]=&amp;#34;&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;TLS_CA_VALUE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;&amp;#34;&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; kubectl apply -f -
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87&#34;&gt;echo&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$TLS_CA_VALUE&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; base64 -d &amp;gt; ca.crt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# In case of MacOS&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# echo $TLS_CA_VALUE | base64 -D &amp;gt; ca.crt&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;bring-your-own-certificates-advanced&#34;&gt;Bring Your Own Certificates (advanced)&lt;/h3&gt;
&lt;p&gt;If you would like to completely manage the tls secrets outside of helm, you can create them in the namespace where agones is going to be installed, and then set the helm value &lt;code&gt;agones.allocator.disableSecretCreation&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt;. This method will also work with the cert-manager method, as long as your certificate and secret are created ahead of time, and you populate the &lt;code&gt;allocator-tls-ca&lt;/code&gt; and &lt;code&gt;allocator-client-ca&lt;/code&gt; yourself.&lt;/p&gt;
&lt;h2 id=&#34;client-certificate&#34;&gt;Client Certificate&lt;/h2&gt;
&lt;p&gt;Because agones-allocator uses an mTLS authentication mechanism, a client must provide a certificate that is accepted by the server.&lt;/p&gt;
&lt;p&gt;If Agones is installed using Helm, you can leverage a default client secret, &lt;code&gt;allocator-client.default&lt;/code&gt;, created in the game server namespace and allowlisted in &lt;code&gt;allocator-client-ca&lt;/code&gt; Kubernetes secret. You can extract and use that secret for client side authentication, by following &lt;a href=&#34;#send-allocation-request&#34;&gt;the allocation example&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Otherwise, here is an example of generating a client certificate using openssl.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;EXTERNAL_IP&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;$(&lt;/span&gt;kubectl get services agones-allocator -n agones-system -o &lt;span style=&#34;color:#000&#34;&gt;jsonpath&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;{.status.loadBalancer.ingress[0].ip}&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;openssl req -x509 -nodes -days &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;365&lt;/span&gt; -newkey rsa:2048 -keyout client.key -out client.crt -addext &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;subjectAltName=IP:&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;EXTERNAL_IP&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;CERT_FILE_VALUE&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;$(&lt;/span&gt;cat client.crt &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; base64 -w 0&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# In case of MacOS&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# CERT_FILE_VALUE=$(cat client.crt | base64)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# allowlist client certificate&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get secret allocator-client-ca -o json -n agones-system &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; jq &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;.data[&amp;#34;client_trial.crt&amp;#34;]=&amp;#34;&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;CERT_FILE_VALUE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;&amp;#34;&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; kubectl apply -f -
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The last command creates a new entry in the secret data map for &lt;code&gt;allocator-client-ca&lt;/code&gt; for the client CA. This is for the &lt;code&gt;agones-allocator&lt;/code&gt; service to accept the newly generated client certificate.&lt;/p&gt;
&lt;h2 id=&#34;send-allocation-request&#34;&gt;Send allocation request&lt;/h2&gt;
&lt;p&gt;After setting up &lt;code&gt;agones-allocator&lt;/code&gt; with server certificate and allowlisting the client certificate, the service can be used to allocate game servers. Make sure you have a &lt;a href=&#34;/site/site/docs/getting-started/create-fleet/&#34;&gt;fleet&lt;/a&gt; with ready game servers in the game server namespace.&lt;/p&gt;
&lt;p&gt;Set the environment variables and store the client secrets before allocating using gRPC or REST APIs:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;NAMESPACE&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;default &lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# replace with any namespace&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;EXTERNAL_IP&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;$(&lt;/span&gt;kubectl get services agones-allocator -n agones-system -o &lt;span style=&#34;color:#000&#34;&gt;jsonpath&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;{.status.loadBalancer.ingress[0].ip}&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;KEY_FILE&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;client.key
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;CERT_FILE&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;client.crt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;TLS_CA_FILE&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;ca.crt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# allocator-client.default secret is created only when using helm installation. Otherwise generate the client certificate and replace the following.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# In case of MacOS replace &amp;#34;base64 -d&amp;#34; with &amp;#34;base64 -D&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get secret allocator-client.default -n &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;NAMESPACE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt; -ojsonpath&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;{.data.tls\.crt}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; base64 -d &amp;gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;CERT_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get secret allocator-client.default -n &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;NAMESPACE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt; -ojsonpath&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;{.data.tls\.key}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; base64 -d &amp;gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;KEY_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get secret allocator-tls-ca -n agones-system -ojsonpath&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;{.data.tls-ca\.crt}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; base64 -d &amp;gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;TLS_CA_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;using-grpc&#34;&gt;Using gRPC&lt;/h3&gt;
&lt;p&gt;To start, take a look at the allocation gRPC client examples in 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/examples/allocator-client/main.go&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;golang&lt;/a&gt;
 and 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/examples/allocator-client-csharp/Program.cs&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;C#&lt;/a&gt;
 languages. In the following, the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/examples/allocator-client/main.go&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;golang gRPC client example&lt;/a&gt;
 is used to allocate a Game Server in the &lt;code&gt;default&lt;/code&gt; namespace.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go run examples/allocator-client/main.go --ip &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;EXTERNAL_IP&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --port &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;443&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --namespace &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;NAMESPACE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --key &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;KEY_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --cert &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;CERT_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --cacert &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;TLS_CA_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;using-rest&#34;&gt;Using REST&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl --key &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;KEY_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;     --cert &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;CERT_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;     --cacert &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;TLS_CA_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;     -H &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;     --data &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;{&amp;#34;namespace&amp;#34;:&amp;#34;&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;NAMESPACE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;&amp;#34;}&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;     https://&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;EXTERNAL_IP&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;/gameserverallocation &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;     -X POST
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You should expect to see the following output:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;gameServerName&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;game-server-name&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;ports&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:[{&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;default&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;port&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;7463&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}],&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;address&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;1.2.3.4&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;nodeName&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;node-name&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;sending-data-to-the-game-server&#34;&gt;Sending Data to the Game Server&lt;/h3&gt;
&lt;p&gt;The service accepts a &lt;code&gt;metadata&lt;/code&gt; field, which can be used to apply &lt;code&gt;labels&lt;/code&gt; and &lt;code&gt;annotations&lt;/code&gt; to the allocated &lt;code&gt;GameServer&lt;/code&gt;. The old &lt;code&gt;metaPatch&lt;/code&gt; fields is now deprecated, but can still be used for compatibility. If both &lt;code&gt;metadata&lt;/code&gt; and &lt;code&gt;metaPatch&lt;/code&gt; fields are set, &lt;code&gt;metaPatch&lt;/code&gt; is ignored.&lt;/p&gt;
&lt;h2 id=&#34;secrets-explained&#34;&gt;Secrets Explained&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;agones-allocator&lt;/code&gt; has a dependency on three Kubernetes secrets:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;allocator-tls&lt;/code&gt; - stores the server certificate.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;allocator-client-ca&lt;/code&gt; - stores the allocation authorized client CA for mTLS to allowlist client certificates.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;allocator-tls-ca&lt;/code&gt; (optional) - stores &lt;code&gt;allocator-tls&lt;/code&gt; CA.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The separation of CA secret from the private secret is for the security reason to avoid reading the private secret, while retrieving the allocator CA that is used by the allocation client to validate the server. It is optional to set or maintain the &lt;code&gt;allocator-tls-ca&lt;/code&gt; secret.&lt;/p&gt;
&lt;h2 id=&#34;troubleshooting&#34;&gt;Troubleshooting&lt;/h2&gt;
&lt;p&gt;If you encounter problems, explore the following potential root causes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Check server certificate - Using openssl you can get the certificate chain for the server.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;EXTERNAL_IP&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;$(&lt;/span&gt;kubectl get services agones-allocator -n agones-system -o &lt;span style=&#34;color:#000&#34;&gt;jsonpath&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;{.status.loadBalancer.ingress[0].ip}&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;openssl s_client -connect &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;EXTERNAL_IP&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;:443
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;Inspect the server certificate by storing the certificate returned, under &lt;code&gt;Server certificate&lt;/code&gt; and validating using &lt;code&gt;openssl x509 -in tls.crt -text -noout&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Make sure the certificate is not expired and the Subject Alternative Name is set.&lt;/li&gt;
&lt;li&gt;If the issuer is &lt;code&gt;CN = allocation-ca&lt;/code&gt;, the certificate is generated using Agones helm installation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check client certificate&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You may get an error such as &lt;code&gt;rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection closed&lt;/code&gt;, make sure your client certificate is allowlisted by being added to &lt;code&gt;allocator-client-ca&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get secret allocator-client-ca -o json -n agones-system
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;If the server certificate is not accepted by the client, you may get an error such as &lt;code&gt;rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = &amp;quot;transport: authentication handshake failed: x509: certificate signed by unknown authority&amp;quot;&lt;/code&gt;, depending on the client. In this case, verify that the TLS CA file matches the server certificate.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get secret allocator-tls -n agones-system -ojsonpath&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;{.data.tls\.crt}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; base64 -d &amp;gt; tls.crt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;openssl verify -verbose -CAfile ca.crt tls.crt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tls.crt: OK
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make sure the service is up and running.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get pod -n agones-system &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; grep agones-allocator
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;agones-allocator-59b4f6b5c6-86j62      1/1     Running     &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;0&lt;/span&gt;          6m36s
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;agones-allocator-59b4f6b5c6-kbqrq      1/1     Running     &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;0&lt;/span&gt;          6m45s
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;agones-allocator-59b4f6b5c6-trbkl      1/1     Running     &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;0&lt;/span&gt;          6m28s
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get service agones-allocator -n agones-system
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;agones-allocator   LoadBalancer   10.55.248.14   34.82.195.204    443:32468/TCP   6d23h
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;api-reference&#34;&gt;API Reference&lt;/h2&gt;
&lt;p&gt;The AllocationService API is located as a gRPC service 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/proto/allocation/allocation.proto&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;here&lt;/a&gt;
. Additionally, the REST API is available as a 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/pkg/allocation/go/allocation.swagger.json&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Swagger API&lt;/a&gt;
.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Multi-cluster Allocation</title>
      <link>/site/docs/advanced/multi-cluster-allocation/</link>
      <pubDate>Fri, 25 Oct 2019 05:45:05 +0000</pubDate>
      
      <guid>/site/docs/advanced/multi-cluster-allocation/</guid>
      <description>
        
        
        

&lt;div class=&#34;pageinfo pageinfo-info&#34;&gt;
&lt;p&gt;This implementation of multi-cluster allocation was written before managed and open source multi-cluster Service Meshes
such as &lt;a href=&#34;https://istio.io/latest/docs/setup/install/multicluster/&#34;&gt;Istio&lt;/a&gt;
and &lt;a href=&#34;https://linkerd.io/2.15/features/multicluster/&#34;&gt;Linkerd&lt;/a&gt;, were available and so widely utilised.&lt;/p&gt;
&lt;p&gt;We now recommend implementing a Service Mesh in each of your Agones clusters and backend services cluster to provide
a multi-cluster allocation endpoint that points to each Agones cluster&amp;rsquo;s
&lt;a href=&#34;/site/site/docs/advanced/allocator-service/&#34;&gt;Allocation Service&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Service Mesh specific projects provide far more powerful features, easier configuration and maintenance, and we
expect that they will be something that you will likely be installing in your multi-cluster architecture anyway.&lt;/p&gt;
&lt;p&gt;Further documentation on setting up Agones with a Service Mesh is incoming, but to see an example utilising
&lt;a href=&#34;https://cloud.google.com/service-mesh&#34;&gt;Google Cloud Service Mesh&lt;/a&gt;, which is backed by Istio, see the
&lt;a href=&#34;https://github.com/googleforgames/global-multiplayer-demo&#34;&gt;Global Scale Game&lt;/a&gt; demo project.&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;There may be different types of clusters, such as on-premise, and Google Kubernetes Engine (GKE), used by a game to help with the cost-saving and availability.
For this purpose, Agones provides a mechanism to define priorities on the clusters. Priorities are defined on 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/pkg/apis/multicluster/v1/gameserverallocationpolicy.go&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;GameServerAllocationPolicy&lt;/a&gt;
 agones CRD. A matchmaker can enable the multi-cluster rules on a request and target &lt;a href=&#34;/site/site/docs/advanced/allocator-service/&#34;&gt;agones-allocator&lt;/a&gt; endpoint in any of the clusters and get resources allocated on the cluster with the highest priority. If the cluster with the highest priority is overloaded, the allocation request is redirected to the cluster with the next highest priority.&lt;/p&gt;
&lt;p&gt;The remainder of this article describes how to enable multi-cluster allocation.&lt;/p&gt;
&lt;h2 id=&#34;define-cluster-priority&#34;&gt;Define Cluster Priority&lt;/h2&gt;
&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/pkg/apis/multicluster/v1/gameserverallocationpolicy.go&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;GameServerAllocationPolicy&lt;/a&gt;
 is the CRD defined by Agones for setting multi-cluster allocation rules. In addition to cluster priority, it describes the connection information for the target cluster, including the game server namespace, agones-allocator endpoint and client K8s secrets name for redirecting the allocation request. Game servers will be allocated from clusters with the lowest &lt;code&gt;priority&lt;/code&gt; number. If there are no available game servers available in clusters with the lowest &lt;code&gt;priority&lt;/code&gt; number, they will be allocated from clusters with the next lowest &lt;code&gt;priority&lt;/code&gt; number. For clusters with the same priority, the cluster is chosen with a probability relative to its weight.&lt;/p&gt;
&lt;p&gt;Here is an example of setting the priority for a cluster and it&amp;rsquo;s connection rules. One such resource should be defined per cluster.&lt;/p&gt;
&lt;p&gt;In the following example the policy is defined for cluster B in cluster A.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cat &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;lt;&amp;lt;EOF | kubectl apply -f -
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;apiVersion: multicluster.agones.dev/v1
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;kind: GameServerAllocationPolicy
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;metadata:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  name: allocator-cluster-b
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  namespace: cluster-a-ns
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;spec:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  connectionInfo:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;    allocationEndpoints:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;    - 34.82.195.204
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;    clusterName: &amp;#34;clusterB&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;    namespace: cluster-b-ns
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;    secretName: allocator-client-to-cluster-b
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;    serverCa: c2VydmVyQ0E=
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  priority: 1
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  weight: 100
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To define the local cluster priority a GameServerAllocationPolicy should be defined &lt;em&gt;without&lt;/em&gt; an &lt;code&gt;allocationEndpoints&lt;/code&gt; field. If the local cluster priority is not defined, the allocation from the local cluster happens only if allocation from other clusters with the existing allocation rules is unsuccessful.&lt;/p&gt;
&lt;p&gt;Allocation requests with multi-cluster allocation enabled but with only the local cluster available (e.g. in development) &lt;em&gt;must&lt;/em&gt; have a local cluster priority defined, or the request fails with the error &amp;ldquo;no multi-cluster allocation policy is specified&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;namespace&lt;/code&gt; field in &lt;code&gt;connectionInfo&lt;/code&gt; is the namespace that the game servers will be allocated in, and must be a namespace in the target cluster that has been previously defined as allowed to host game servers. The &lt;code&gt;Namespace&lt;/code&gt; specified in the allocation request (below) is used to refer to the namespace that the GameServerAllocationPolicy itself is located in.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;serverCa&lt;/code&gt; is the server TLS CA public certificate, set only if the remote server certificate is not signed by a public CA (e.g. self-signed). If this field is not specified, the certificate can also be specified in a field named &lt;code&gt;ca.crt&lt;/code&gt; of the client secret (the secret referred to in the &lt;code&gt;secretName&lt;/code&gt; field).&lt;/p&gt;
&lt;h2 id=&#34;establish-trust&#34;&gt;Establish trust&lt;/h2&gt;
&lt;p&gt;To accept allocation requests from other clusters, agones-allocator for cluster B should be configured to accept the client&amp;rsquo;s certificate from cluster A and the cluster A&amp;rsquo;s client should be configured to accept the server TLS certificate, if it is not signed by a public Certificate Authority (CA).&lt;/p&gt;
&lt;p&gt;Follow the steps to configure the &lt;a href=&#34;/site/site/docs/advanced/allocator-service/&#34;&gt;agones allocator gRPC service&lt;/a&gt;. The client certificate pair in the mentioned document is stored as a K8s secret. Here are the secrets to set:&lt;/p&gt;
&lt;p&gt;1.Client certificate to talk to other clusters:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cat &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;lt;&amp;lt;EOF | kubectl apply -f -
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;apiVersion: v1
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;kind: Secret
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;metadata:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  name: allocator-client-to-cluster-b
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  namespace: cluster-a-ns
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;type: Opaque
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;data:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  tls.crt: &amp;lt;REDACTED&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  tls.key: &amp;lt;REDACTED&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  ca.crt: &amp;lt;REDACTED&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The certificates are base 64 string of the certificate file e.g. &lt;code&gt;cat ${CERT_FILE} | base64 -w 0&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Agones recommends using &lt;a href=&#34;https://cert-manager.io/&#34;&gt;cert-manager.io&lt;/a&gt; solution for generating client certificates.&lt;/p&gt;
&lt;p&gt;2.Add client CA to the list of authorized client certificates by agones-allocator in the targeted cluster.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cat &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;lt;&amp;lt;EOF | kubectl apply -f -
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;apiVersion: v1
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;kind: Secret
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;metadata:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  name: allocator-client-ca
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  namespace: agones-system
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;type: Opaque
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;data:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  client1.crt: &amp;lt;REDACTED&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  client2.crt: &amp;lt;REDACTED&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  …
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;  clientN.crt: &amp;lt;REDACTED&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;allocate-multi-cluster&#34;&gt;Allocate multi-cluster&lt;/h2&gt;
&lt;p&gt;To enable multi-cluster allocation, set &lt;code&gt;multiClusterSetting.enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; in 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/proto/allocation/allocation.proto&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;allocation.proto&lt;/a&gt;
 and send allocation requests. For more information visit &lt;a href=&#34;/site/site/docs/advanced/allocator-service/&#34;&gt;agones-allocator&lt;/a&gt;. In the following, using 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/examples/allocator-client/main.go&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;allocator-client sample&lt;/a&gt;
, a multi-cluster allocation request is sent to the agones-allocator service. If the allocation succeeds, the AllocationResponse will contain a 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/proto/allocation/allocation.proto&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Source&lt;/a&gt;
 field which indicates the endpoint of the remote agones-allocator.&lt;/p&gt;
&lt;p&gt;Set the environment variables and store the client secrets before allocating using gRPC or REST APIs&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;NAMESPACE&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;default &lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# replace with any namespace&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;EXTERNAL_IP&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;$(&lt;/span&gt;kubectl get services agones-allocator -n agones-system -o &lt;span style=&#34;color:#000&#34;&gt;jsonpath&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;{.status.loadBalancer.ingress[0].ip}&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;KEY_FILE&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;client.key
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;CERT_FILE&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;client.crt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000&#34;&gt;TLS_CA_FILE&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;ca.crt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# allocator-client.default secret is created only when using helm installation. Otherwise generate the client certificate and replace the following.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# In case of MacOS replace &amp;#34;base64 -d&amp;#34; with &amp;#34;base64 -D&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get secret allocator-client.default -n &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;NAMESPACE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt; -ojsonpath&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;{.data.tls\.crt}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; base64 -d &amp;gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;CERT_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get secret allocator-client.default -n &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;NAMESPACE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt; -ojsonpath&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;{.data.tls\.key}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; base64 -d &amp;gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;KEY_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get secret allocator-tls-ca -n agones-system -ojsonpath&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;{.data.tls-ca\.crt}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; base64 -d &amp;gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;TLS_CA_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go run examples/allocator-client/main.go --ip &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;EXTERNAL_IP&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --namespace &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;NAMESPACE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --key &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;KEY_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --cert &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;CERT_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --cacert &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;TLS_CA_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --multicluster &lt;span style=&#34;color:#204a87&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If using REST use&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl --key &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;KEY_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;     --cert &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;CERT_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;     --cacert &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;TLS_CA_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;     -H &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;     --data &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;{&amp;#34;namespace&amp;#34;:&amp;#34;&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;NAMESPACE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;&amp;#34;, &amp;#34;multiClusterSetting&amp;#34;:{&amp;#34;enabled&amp;#34;:true}}&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;     https://&lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;EXTERNAL_IP&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;/gameserverallocation &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;     -X POST
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;troubleshooting&#34;&gt;Troubleshooting&lt;/h2&gt;
&lt;p&gt;If you encounter problems, explore the following potential root causes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Make sure single cluster allocation works for each cluster using &lt;a href=&#34;/site/site/docs/advanced/allocator-service/#troubleshooting&#34;&gt;this troubleshooting&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For each cluster, make sure there is a &lt;code&gt;GameServerAllocationPolicy&lt;/code&gt; resource defined in the game server cluster.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Inspect the &lt;code&gt;.spec.connectionInfo&lt;/code&gt; for &lt;code&gt;GameServerAllocationPolicy&lt;/code&gt; for each cluster. Use the cluster connection information in that field to verify that single cluster allocation works. Use the information to verify the connection:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-none&#34; data-lang=&#34;none&#34;&gt;POLICY_NAME=&amp;lt;policy-name&amp;gt;
POLICY_NAMESPACE=&amp;lt;policy-namespace&amp;gt;

NAMESPACE=$(kubectl get gameserverallocationpolicy ${POLICY_NAME} -n ${POLICY_NAMESPACE} -ojsonpath={.spec.connectionInfo.namespace})
EXTERNAL_IP=$(kubectl get gameserverallocationpolicy ${POLICY_NAME} -n ${POLICY_NAMESPACE} -ojsonpath={.spec.connectionInfo.allocationEndpoints\[0\]})
CLIENT_SECRET_NAME=$(kubectl get gameserverallocationpolicy ${POLICY_NAME} -n ${POLICY_NAMESPACE} -ojsonpath={.spec.connectionInfo.secretName})

KEY_FILE=client.key
CERT_FILE=client.crt
TLS_CA_FILE=ca.crt

# In case of MacOS replace &amp;#34;base64 -d&amp;#34; with &amp;#34;base64 -D&amp;#34;
kubectl get secret &amp;#34;${CLIENT_SECRET_NAME}&amp;#34; -n &amp;#34;${POLICY_NAMESPACE}&amp;#34; -ojsonpath=&amp;#34;{.data.tls\.crt}&amp;#34; | base64 -d &amp;gt; &amp;#34;${CERT_FILE}&amp;#34;
kubectl get secret &amp;#34;${CLIENT_SECRET_NAME}&amp;#34; -n &amp;#34;${POLICY_NAMESPACE}&amp;#34; -ojsonpath=&amp;#34;{.data.tls\.key}&amp;#34; | base64 -d &amp;gt; &amp;#34;${KEY_FILE}&amp;#34;
kubectl get secret &amp;#34;${CLIENT_SECRET_NAME}&amp;#34; -n &amp;#34;${POLICY_NAMESPACE}&amp;#34; -ojsonpath=&amp;#34;{.data.ca\.crt}&amp;#34; | base64 -d &amp;gt; &amp;#34;${TLS_CA_FILE}&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go run examples/allocator-client/main.go --ip &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;EXTERNAL_IP&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --port &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;443&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --namespace &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;NAMESPACE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --key &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;KEY_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --cert &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;CERT_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --cacert &lt;span style=&#34;color:#4e9a06&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;TLS_CA_FILE&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
      </description>
    </item>
    
    <item>
      <title>Docs: GameServer Pod Service Accounts</title>
      <link>/site/docs/advanced/service-accounts/</link>
      <pubDate>Thu, 14 Mar 2019 04:30:37 +0000</pubDate>
      
      <guid>/site/docs/advanced/service-accounts/</guid>
      <description>
        
        
        &lt;h2 id=&#34;default-settings&#34;&gt;Default Settings&lt;/h2&gt;
&lt;p&gt;By default, Agones sets up service accounts and sets them appropriately for the &lt;code&gt;Pods&lt;/code&gt; that are created for &lt;code&gt;GameServers&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Since Agones provides &lt;code&gt;GameServer&lt;/code&gt; &lt;code&gt;Pods&lt;/code&gt; with a sidecar container that needs access to Agones Custom Resource Definitions,
&lt;code&gt;Pods&lt;/code&gt; are configured with a service account with extra RBAC permissions to ensure that it can read and modify the resources it needs.&lt;/p&gt;
&lt;p&gt;Since service accounts apply to all containers in a &lt;code&gt;Pod&lt;/code&gt;, Agones will automatically overwrite the mounted key for the
service account in the container that is running the dedicated game server in the backing &lt;code&gt;Pod&lt;/code&gt;. This is done
since game server containers are exposed publicly, and generally don&amp;rsquo;t require the extra permissions to access aspects
of the Kubernetes API.&lt;/p&gt;
&lt;h2 id=&#34;bringing-your-own-service-account&#34;&gt;Bringing your own Service Account&lt;/h2&gt;
&lt;p&gt;If needed, you can provide your own service account on the &lt;code&gt;Pod&lt;/code&gt; specification in the &lt;code&gt;GameServer&lt;/code&gt; configuration.&lt;/p&gt;


&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Warning&lt;/h4&gt;

    &lt;p&gt;If you bring your own Service Account, it&amp;rsquo;s your responsibility to ensure it matches all the RBAC permissions
the &lt;code&gt;GameServer&lt;/code&gt; &lt;code&gt;Pod&lt;/code&gt; usually acquires from Agones by default, otherwise &lt;code&gt;GameServers&lt;/code&gt; can fail.&lt;/p&gt;
&lt;p&gt;The default RBAC permissions for can be found in the
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/install/helm/agones/templates/serviceaccounts/sdk.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;installation
YAML on GitHub&lt;/a&gt;
and can be used for a reference.&lt;/p&gt;


&lt;/div&gt;

&lt;p&gt;For example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/v1&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;kind&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;GameServer&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;metadata&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;generateName&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;simple-game-server-&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;ports&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;default&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;containerPort&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;7654&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;template&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;serviceAccountName&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;my-special-service-account&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# a custom service account&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;containers&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;simple-game-server&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;image&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If a service account is configured, the mounted key is not overwritten, as it assumed that you want to have full control
of the service account and underlying RBAC permissions.&lt;/p&gt;

      </description>
    </item>
    
  </channel>
</rss>
