<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Agones – Guides</title>
    <link>/site/docs/guides/</link>
    <description>Recent content in Guides on Agones</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Wed, 02 Jan 2019 00:00:00 +0000</lastBuildDate>
    
	  <atom:link href="/site/docs/guides/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Docs: Feature Stages</title>
      <link>/site/docs/guides/feature-stages/</link>
      <pubDate>Thu, 26 Sep 2019 01:20:41 +0000</pubDate>
      
      <guid>/site/docs/guides/feature-stages/</guid>
      <description>
        
        
        &lt;h2 id=&#34;supported-versions&#34;&gt;Supported Versions&lt;/h2&gt;
&lt;p&gt;Agones versions are expressed as x.y.z, where x is the major version, y is the minor version, and z is the patch version
following &lt;a href=&#34;http://semver.org/&#34;&gt;Semantic Versioning&lt;/a&gt; terminology.&lt;/p&gt;
&lt;h2 id=&#34;agones-features&#34;&gt;Agones Features&lt;/h2&gt;
&lt;p&gt;A feature within Agones can be in &lt;code&gt;Alpha&lt;/code&gt;, &lt;code&gt;Beta&lt;/code&gt; or &lt;code&gt;Stable&lt;/code&gt; stage.&lt;/p&gt;
&lt;h2 id=&#34;feature-gates&#34;&gt;Feature Gates&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;Alpha&lt;/code&gt; and &lt;code&gt;Beta&lt;/code&gt; features can be enabled or disabled through the &lt;code&gt;agones.featureGates&lt;/code&gt; configuration option
that can be found in the &lt;a href=&#34;/site/site/docs/installation/install-agones/helm/#configuration&#34;&gt;Helm configuration&lt;/a&gt; documentation.&lt;/p&gt;
&lt;p&gt;The current set of &lt;code&gt;alpha&lt;/code&gt; and &lt;code&gt;beta&lt;/code&gt; feature gates:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature Name&lt;/th&gt;
&lt;th&gt;Gate&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;th&gt;Stage&lt;/th&gt;
&lt;th&gt;Since&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&#34;/site/site/docs/guides/fleet-updates/#notifying-gameservers-on-fleet-updatedownscale&#34;&gt;Allocated GameServers are notified on relevant Fleet Updates&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;FleetAllocationOverflow&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Enabled&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Beta&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1.37.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&#34;https://github.com/googleforgames/agones/issues/2716&#34;&gt;CountsAndLists&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;CountsAndLists&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Disabled&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Alpha&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1.37.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&#34;https://github.com/googleforgames/agones/issues/3377&#34;&gt;DisableResyncOnSDKServer&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;DisableResyncOnSDKServer&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Disabled&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Alpha&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1.37.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&#34;https://github.com/googleforgames/agones/issues/1239&#34;&gt;GameServer player capacity filtering on GameServerAllocations&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;PlayerAllocationFilter&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Disabled&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Alpha&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1.14.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&#34;/site/site/docs/guides/player-tracking/&#34;&gt;Player Tracking&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;PlayerTracking&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Disabled&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Alpha&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1.6.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Example Gate (not in use)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Example&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Disabled&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;0.13.0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&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;

    If you aren&amp;rsquo;t sure if Feature Flags have been set correctly, have a look at the
&lt;em&gt;&lt;a href=&#34;/site/site/docs/guides/troubleshooting/#the-feature-flag-i-enableddisabled-isnt-working-as-expected&#34;&gt;The Feature Flag I enabled/disabled isn&amp;rsquo;t working as expected&lt;/a&gt;&lt;/em&gt;
troubleshooting section.

&lt;/div&gt;

&lt;h2 id=&#34;description-of-stages&#34;&gt;Description of Stages&lt;/h2&gt;
&lt;h3 id=&#34;alpha&#34;&gt;Alpha&lt;/h3&gt;
&lt;p&gt;An &lt;code&gt;Alpha&lt;/code&gt; feature means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Disabled by default.&lt;/li&gt;
&lt;li&gt;Might be buggy. Enabling the feature may expose bugs.&lt;/li&gt;
&lt;li&gt;Support for this feature may be dropped at any time without notice.&lt;/li&gt;
&lt;li&gt;The API may change in incompatible ways in a later software release without notice.&lt;/li&gt;
&lt;li&gt;Recommended for use only in short-lived testing clusters, due to increased risk of bugs and lack of long-term support.&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;

    Please do try &lt;code&gt;Alpha&lt;/code&gt; features and give feedback on them. This is important to ensure less breaking changes
through the &lt;code&gt;Beta&lt;/code&gt; period.

&lt;/div&gt;

&lt;h3 id=&#34;beta&#34;&gt;Beta&lt;/h3&gt;
&lt;p&gt;A &lt;code&gt;Beta&lt;/code&gt; feature means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enabled by default, but able to be disabled through a feature gate.&lt;/li&gt;
&lt;li&gt;The feature is well tested. Enabling the feature is considered safe.&lt;/li&gt;
&lt;li&gt;Support for the overall feature will not be dropped, though details may change.&lt;/li&gt;
&lt;li&gt;The schema and/or semantics of objects may change in incompatible ways in a subsequent beta or stable releases. When
this happens, we will provide instructions for migrating to the next version. This may require deleting, editing,
and re-creating API objects. The editing process may require some thought. This may require downtime for
applications that rely on the feature.&lt;/li&gt;
&lt;li&gt;Recommended for only non-business-critical uses because of potential for incompatible changes in subsequent releases.
If you have multiple clusters that can be upgraded independently, you may be able to relax this restriction.&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;

    Note: Please do try &lt;code&gt;Beta&lt;/code&gt; features and give feedback on them! After they exit beta, it may not be practical for us
to make more changes.

&lt;/div&gt;

&lt;h3 id=&#34;stable&#34;&gt;Stable&lt;/h3&gt;
&lt;p&gt;A &lt;code&gt;Stable&lt;/code&gt; feature means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The feature is enabled and the corresponding feature gate no longer exists.&lt;/li&gt;
&lt;li&gt;Stable versions of features will appear in released software for many subsequent versions.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;feature-stage-indicators&#34;&gt;Feature Stage Indicators&lt;/h2&gt;
&lt;p&gt;There are a variety of features with Agones, how can we determine what stage each feature is in?&lt;/p&gt;
&lt;p&gt;Below are indicators for each type of functionality that can be used to determine the feature stage for a given aspect
of Agones.&lt;/p&gt;
&lt;h3 id=&#34;custom-resource-definitions-crds&#34;&gt;Custom Resource Definitions (CRDs)&lt;/h3&gt;
&lt;p&gt;This refers to Kubernetes resource for Agones, such as &lt;code&gt;GameServer&lt;/code&gt;, &lt;code&gt;Fleet&lt;/code&gt; and &lt;code&gt;GameServerAllocation&lt;/code&gt;.&lt;/p&gt;
&lt;h4 id=&#34;new-crds&#34;&gt;New CRDs&lt;/h4&gt;
&lt;p&gt;For new resources, the stage of the resource will be indicated by the &lt;code&gt;apiVersion&lt;/code&gt; of the resource.&lt;/p&gt;
&lt;p&gt;For example: &lt;code&gt;apiVersion: &amp;quot;agones.dev/v1&amp;quot;&lt;/code&gt; is a &lt;code&gt;stable&lt;/code&gt; resource, &lt;code&gt;apiVersion: &amp;quot;agones.dev/v1beta1&amp;quot;&lt;/code&gt; is a &lt;code&gt;beta&lt;/code&gt;
stage resource, and &lt;code&gt;apiVersion: &amp;quot;agones.dev/v1alpha1&amp;quot;&lt;/code&gt; is an &lt;code&gt;alpha&lt;/code&gt; stage resource.&lt;/p&gt;
&lt;h4 id=&#34;new-crd-attributes&#34;&gt;New CRD attributes&lt;/h4&gt;
&lt;p&gt;When &lt;code&gt;alpha&lt;/code&gt; and &lt;code&gt;beta&lt;/code&gt; attributes are added to an existing stable Agones CRD, we will follow the Kubernetes &lt;a href=&#34;https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api_changes.md#adding-unstable-features-to-stable-versions&#34;&gt;&lt;em&gt;Adding
Unstable Features to Stable Versions&lt;/em&gt;&lt;/a&gt;
Guide to optimise on the least amount of breaking changes for users as attributes progress through feature stages.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;alpha&lt;/code&gt; and &lt;code&gt;beta&lt;/code&gt; attributes will be added to the existing CRD as &lt;code&gt;optional&lt;/code&gt; and documented with their feature stage.
Attempting to populate these &lt;code&gt;alpha&lt;/code&gt; and &lt;code&gt;beta&lt;/code&gt; attributes on an Agones CRD will return a validation error if their
accompanying Feature Flag is not enabled.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;alpha&lt;/code&gt; and &lt;code&gt;beta&lt;/code&gt; attributes can be subject to change of name and structure, and will result in breaking changes
before moving to a &lt;code&gt;stable&lt;/code&gt; stage. These changes will be outlined in release notes and feature documentation.&lt;/p&gt;
&lt;h3 id=&#34;agones-game-server-sdk&#34;&gt;Agones Game Server SDK&lt;/h3&gt;
&lt;p&gt;Any &lt;code&gt;alpha&lt;/code&gt; or &lt;code&gt;beta&lt;/code&gt; Game Server SDK functionality will be a subpackage of the &lt;code&gt;sdk&lt;/code&gt; package. For example
, functionality found in a &lt;code&gt;sdk.alphav1&lt;/code&gt; package should be considered at the &lt;code&gt;alpha&lt;/code&gt; feature stage.&lt;/p&gt;
&lt;p&gt;Only experimental functionality will be found in any &lt;code&gt;alpha&lt;/code&gt; and &lt;code&gt;beta&lt;/code&gt; SDK packages, and as such may change as
development occurs.&lt;/p&gt;
&lt;p&gt;As SDK features move to through feature stages towards &lt;code&gt;stable&lt;/code&gt;, the previous version of the SDK API
will remain for at least one release to enable easy migration to the more stable feature stage (i.e. from &lt;code&gt;alpha &lt;/code&gt; -&amp;gt; &lt;code&gt;beta&lt;/code&gt;, &lt;code&gt;beta&lt;/code&gt; -&amp;gt; &lt;code&gt;stable&lt;/code&gt;)&lt;/p&gt;
&lt;p&gt;Any other SDK functionality not marked as &lt;code&gt;alpha&lt;/code&gt; or &lt;code&gt;beta&lt;/code&gt; is assumed to be &lt;code&gt;stable&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;rest--grpc-apis&#34;&gt;REST &amp;amp; gRPC APIs&lt;/h3&gt;
&lt;p&gt;REST and gRPC API will have versioned paths where appropriate to indicate their feature stage.&lt;/p&gt;
&lt;p&gt;For example, a REST API with a prefix of &lt;code&gt;v1alpha1&lt;/code&gt; is an &lt;code&gt;alpha&lt;/code&gt; stage feature:
&lt;code&gt;http://api.example.com/v1alpha1/exampleaction&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Similar to the SDK, any &lt;code&gt;alpha&lt;/code&gt; or &lt;code&gt;beta&lt;/code&gt; gRPC functionality will be a subpackage of the main API package.
For example, functionality found in a &lt;code&gt;api.alphav1&lt;/code&gt; package should be considered at the &lt;code&gt;alpha&lt;/code&gt; feature stage.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Best Practices</title>
      <link>/site/docs/guides/best-practices/</link>
      <pubDate>Fri, 12 May 2023 00:00:00 +0000</pubDate>
      
      <guid>/site/docs/guides/best-practices/</guid>
      <description>
        
        
        &lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;
&lt;p&gt;Running Agones in production takes consideration, from planning your launch to figuring
out the best course of action for cluster and Agones upgrades. On this page, we&amp;rsquo;ve collected
some general best practices. We also have cloud specific pages for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/best-practices/gke/&#34;&gt;Google Kubernetes Engine (GKE)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you are interested in submitting best practices for your cloud prodiver / on-prem, &lt;a href=&#34;/site/site/docs/contribute/&#34;&gt;please contribute!&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;separation-of-agones-from-gameserver-nodes&#34;&gt;Separation of Agones from GameServer nodes&lt;/h2&gt;
&lt;p&gt;When running in production, Agones should be scheduled on a dedicated pool of nodes, distinct from where Game Servers
are scheduled for better isolation and resiliency. By default Agones prefers to be scheduled on nodes labeled with
&lt;code&gt;agones.dev/agones-system=true&lt;/code&gt; and tolerates the node taint &lt;code&gt;agones.dev/agones-system=true:NoExecute&lt;/code&gt;.
If no dedicated nodes are available, Agones will run on regular nodes. See &lt;a href=&#34;https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/&#34;&gt;taints and tolerations&lt;/a&gt;
for more information about Kubernetes taints and tolerations.&lt;/p&gt;
&lt;p&gt;If you are collecting &lt;a href=&#34;/site/site/docs/guides/metrics/&#34;&gt;Metrics&lt;/a&gt; using our standard Prometheus installation, see
&lt;a href=&#34;/site/site/docs/guides/metrics/#prometheus-installation&#34;&gt;the installation guide&lt;/a&gt; for instructions on configuring a separate node pool for the &lt;code&gt;agones.dev/agones-metrics=true&lt;/code&gt; taint.&lt;/p&gt;
&lt;p&gt;See &lt;a href=&#34;/site/site/docs/installation/creating-cluster/&#34;&gt;Creating a Cluster&lt;/a&gt; for initial set up on your cloud provider.&lt;/p&gt;
&lt;h2 id=&#34;redundant-clusters&#34;&gt;Redundant Clusters&lt;/h2&gt;
&lt;h3 id=&#34;allocate-across-clusters&#34;&gt;Allocate Across Clusters&lt;/h3&gt;
&lt;p&gt;Agones supports &lt;a href=&#34;/site/site/docs/advanced/multi-cluster-allocation/&#34;&gt;Multi-cluster Allocation&lt;/a&gt;, allowing you to allocate from a set of clusters, versus a single point of potential failure. There are several other options for multi-cluster allocation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://cloud.google.com/anthos/service-mesh&#34;&gt;Anthos Service Mesh&lt;/a&gt; can be used to route allocation traffic to different clusters based on arbitrary criteria. See &lt;a href=&#34;https://github.com/googleforgames/global-multiplayer-demo&#34;&gt;Global Multiplayer Demo&lt;/a&gt; for an example where the match maker influences which cluster the allocation is routed to.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/googleforgames/agones/tree/main/examples/allocation-endpoint&#34;&gt;Allocation Endpoint&lt;/a&gt; can be used in Cloud Run to proxy allocation requests.&lt;/li&gt;
&lt;li&gt;Or peruse the &lt;a href=&#34;/site/site/docs/third-party-content/libraries-tools/#allocation&#34;&gt;Third Party Examples&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;spread&#34;&gt;Spread&lt;/h3&gt;
&lt;p&gt;You should consider spreading your game servers in two ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Across geographic fault domains&lt;/strong&gt; (&lt;a href=&#34;https://cloud.google.com/compute/docs/regions-zones&#34;&gt;GCP regions&lt;/a&gt;, &lt;a href=&#34;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html&#34;&gt;AWS availability zones&lt;/a&gt;, separate datacenters, etc.): This is desirable for geographic fault isolation, but also for optimizing client latency to the game server.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Within a fault domain&lt;/strong&gt;: Kubernetes Clusters are single points of failure. A single misconfigured RBAC rule, an overloaded Kubernetes Control Plane, etc. can prevent new game server allocations, or worse, disrupt existing sessions. Running multiple clusters within a fault domain also allows for &lt;a href=&#34;/site/site/docs/installation/upgrading/#upgrading-agones-multiple-clusters&#34;&gt;easier upgrades&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Agones Game Server Client SDKs</title>
      <link>/site/docs/guides/client-sdks/</link>
      <pubDate>Wed, 02 Jan 2019 10:16:30 +0000</pubDate>
      
      <guid>/site/docs/guides/client-sdks/</guid>
      <description>
        
        
        &lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;
&lt;p&gt;The client SDKs are required for a game server to work with Agones.&lt;/p&gt;
&lt;p&gt;The current supported SDKs are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/client-sdks/unreal/&#34;&gt;Unreal Engine&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/client-sdks/unity/&#34;&gt;Unity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/client-sdks/cpp/&#34;&gt;C++&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/client-sdks/csharp/&#34;&gt;C#&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/client-sdks/nodejs/&#34;&gt;Node.js&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/client-sdks/go/&#34;&gt;Go&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/client-sdks/rust/&#34;&gt;Rust&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/client-sdks/rest/&#34;&gt;REST&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can also find some externally supported SDKs in our
&lt;a href=&#34;/site/site/docs/third-party-content/libraries-tools/#client-sdks&#34;&gt;Third Party Content&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The SDKs are relatively thin wrappers around &lt;a href=&#34;https://grpc.io&#34;&gt;gRPC&lt;/a&gt; generated clients,
or an implementation of the REST API (exposed via &lt;a href=&#34;https://github.com/grpc-ecosystem/grpc-gateway&#34;&gt;grpc-gateway&lt;/a&gt;),
where gRPC client generation and compilation isn&amp;rsquo;t well supported.&lt;/p&gt;
&lt;p&gt;They connect to a small process that Agones coordinates to run alongside the Game Server
in a Kubernetes &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/&#34;&gt;&lt;code&gt;Pod&lt;/code&gt;&lt;/a&gt;.
This means that more languages can be supported in the future with minimal effort
(but pull requests are welcome! 😊 ).&lt;/p&gt;
&lt;p&gt;There is also &lt;a href=&#34;/site/site/docs/guides/client-sdks/local/&#34;&gt;local development tooling&lt;/a&gt; for working against the SDK locally,
without having to spin up an entire Kubernetes infrastructure.&lt;/p&gt;
&lt;h2 id=&#34;connecting-to-the-sdk-server&#34;&gt;Connecting to the SDK Server&lt;/h2&gt;
&lt;p&gt;Starting with Agones 1.1.0, the port that the SDK Server listens on for incoming gRPC or HTTP requests is
configurable. This provides flexibility in cases where the default port conflicts with a port that is needed
by the game server.&lt;/p&gt;
&lt;p&gt;Agones will automatically set the following environment variables on all game server containers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;AGONES_SDK_GRPC_PORT&lt;/code&gt;: The port where the gRPC server is listening (defaults to 9357)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AGONES_SDK_HTTP_PORT&lt;/code&gt;: The port where the grpc-gateway is listening (defaults to 9358)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The SDKs will automatically discover and connect to the gRPC port specified in the environment variable.&lt;/p&gt;
&lt;p&gt;If your game server requires using a REST client, it is advised to use the port from the environment variable,
otherwise your game server will not be able to contact the SDK server if it is configured to use a non-default port.&lt;/p&gt;
&lt;h2 id=&#34;function-reference&#34;&gt;Function Reference&lt;/h2&gt;
&lt;p&gt;While each of the SDKs are canonical to their languages, they all have the following
functions that implement the core responsibilities of the SDK.&lt;/p&gt;
&lt;p&gt;For language specific documentation, have a look at the respective source (linked above),
and the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/examples&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;examples&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;Calling any of state changing functions mentioned below does not guarantee that GameServer Custom Resource object would actually change its state right after the call. For instance, it could be moved to the &lt;code&gt;Shutdown&lt;/code&gt; state elsewhere (for example, when a fleet scales down), which leads to no changes in &lt;code&gt;GameServer&lt;/code&gt; object. You can verify the result of this call by waiting for the desired state in a callback to WatchGameServer() function.&lt;/p&gt;
&lt;p&gt;Functions which changes GameServer state or settings are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Ready()&lt;/li&gt;
&lt;li&gt;Shutdown()&lt;/li&gt;
&lt;li&gt;SetLabel()&lt;/li&gt;
&lt;li&gt;SetAnnotation()&lt;/li&gt;
&lt;li&gt;Allocate()&lt;/li&gt;
&lt;li&gt;Reserve()&lt;/li&gt;
&lt;li&gt;Alpha().SetCapacity()&lt;/li&gt;
&lt;li&gt;Alpha().PlayerConnect()&lt;/li&gt;
&lt;li&gt;Alpha().PlayerDisconnect()&lt;/li&gt;
&lt;li&gt;Alpha().SetCounterCount()&lt;/li&gt;
&lt;li&gt;Alpha().IncrementCounter()&lt;/li&gt;
&lt;li&gt;Alpha().DecrementCounter()&lt;/li&gt;
&lt;li&gt;Alpha().SetCounterCapacity()&lt;/li&gt;
&lt;li&gt;Alpha().AppendListValue()&lt;/li&gt;
&lt;li&gt;Alpha().DeleteListValue()&lt;/li&gt;
&lt;li&gt;Alpha().SetListCapacity()&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;lifecycle-management&#34;&gt;Lifecycle Management&lt;/h3&gt;
&lt;h4 id=&#34;ready&#34;&gt;Ready()&lt;/h4&gt;
&lt;p&gt;This tells Agones that the Game Server is ready to take player connections.
Once a Game Server has specified that it is &lt;code&gt;Ready&lt;/code&gt;, then the Kubernetes
GameServer record will be moved to the &lt;code&gt;Ready&lt;/code&gt; state, and the details
for its public address and connection port will be populated.&lt;/p&gt;
&lt;p&gt;While Agones prefers that &lt;code&gt;Shutdown()&lt;/code&gt; is run once a game has completed to delete the &lt;code&gt;GameServer&lt;/code&gt; instance,
if you want or need to move an &lt;code&gt;Allocated&lt;/code&gt; &lt;code&gt;GameServer&lt;/code&gt; back to &lt;code&gt;Ready&lt;/code&gt; to be reused, you can call this SDK method again to do
this.&lt;/p&gt;
&lt;h4 id=&#34;health&#34;&gt;Health()&lt;/h4&gt;
&lt;p&gt;This sends a single ping to designate that the Game Server is alive and
healthy. Failure to send pings within the configured thresholds will result
in the GameServer being marked as &lt;code&gt;Unhealthy&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;See the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/examples/gameserver.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;gameserver.yaml&lt;/a&gt;
 for all health checking
configurations.&lt;/p&gt;
&lt;h4 id=&#34;reserveseconds&#34;&gt;Reserve(seconds)&lt;/h4&gt;
&lt;p&gt;With some matchmaking scenarios and systems it is important to be able to ensure that a &lt;code&gt;GameServer&lt;/code&gt; is unable to be deleted,
but doesn&amp;rsquo;t trigger a FleetAutoscaler scale up. This is where &lt;code&gt;Reserve(seconds)&lt;/code&gt; is useful.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Reserve(seconds)&lt;/code&gt; will move the &lt;code&gt;GameServer&lt;/code&gt; into the Reserved state for the specified number of seconds (0 is forever), and then it will be
moved back to &lt;code&gt;Ready&lt;/code&gt; state. While in &lt;code&gt;Reserved&lt;/code&gt; state, the &lt;code&gt;GameServer&lt;/code&gt; will not be deleted on scale down or &lt;code&gt;Fleet&lt;/code&gt; update,
and also it could not be Allocated using &lt;a href=&#34;/site/site/docs/reference/gameserverallocation/&#34;&gt;GameServerAllocation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This is often used when a game server process must register itself with an external system, such as a matchmaker,
that requires it to designate itself as available for a game session for a certain period. Once a game session has started,
it should call &lt;code&gt;SDK.Allocate()&lt;/code&gt; to designate that players are currently active on it.&lt;/p&gt;
&lt;p&gt;Calling other state changing SDK commands such as &lt;code&gt;Ready&lt;/code&gt; or &lt;code&gt;Allocate&lt;/code&gt; will turn off the timer to reset the &lt;code&gt;GameServer&lt;/code&gt; back
to the &lt;code&gt;Ready&lt;/code&gt; state or to promote it to an &lt;code&gt;Allocated&lt;/code&gt; state accordingly.&lt;/p&gt;
&lt;h4 id=&#34;allocate&#34;&gt;Allocate()&lt;/h4&gt;
&lt;p&gt;With some matchmakers and game matching strategies, it can be important for game servers to mark themselves as &lt;code&gt;Allocated&lt;/code&gt;.
For those scenarios, this SDK functionality exists.&lt;/p&gt;
&lt;p&gt;There is a chance that GameServer does not actually become &lt;code&gt;Allocated&lt;/code&gt; after this call. Please refer to the general note in &lt;a href=&#34;#function-reference&#34;&gt;Function Reference&lt;/a&gt; above.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;agones.dev/last-allocated&lt;/code&gt; annotation will be set on the GameServer to an RFC3339 formatted timestamp of the time of allocation, even if the GameServer was already in an &lt;code&gt;Allocated&lt;/code&gt; state.&lt;/p&gt;
&lt;p&gt;Note that if using &lt;code&gt;SDK.Allocate()&lt;/code&gt; in combination with &lt;a href=&#34;/site/site/docs/reference/gameserverallocation/&#34;&gt;GameServerAllocation&lt;/a&gt;s, it&amp;rsquo;s possible for the &lt;code&gt;agones.dev/last-allocated&lt;/code&gt; timestamp to move backwards if clocks are not synchronized between the Agones controller and the GameServer pod.&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;

    Using a &lt;a href=&#34;/site/site/docs/reference/gameserverallocation/&#34;&gt;GameServerAllocation&lt;/a&gt; is preferred in all other scenarios,
as it gives Agones control over how packed &lt;code&gt;GameServers&lt;/code&gt; are scheduled within a cluster, whereas with &lt;code&gt;Allocate()&lt;/code&gt; you
relinquish control to an external service which likely doesn&amp;rsquo;t have as much information as Agones.

&lt;/div&gt;

&lt;h4 id=&#34;shutdown&#34;&gt;Shutdown()&lt;/h4&gt;
&lt;p&gt;This tells Agones to shut down the currently running game server. The GameServer state will be set &lt;code&gt;Shutdown&lt;/code&gt; and the
backing Pod will be Terminated.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s worth reading the &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination&#34;&gt;Termination of Pods&lt;/a&gt;
Kubernetes documentation, to understand the termination process, and the related configuration options.&lt;/p&gt;
&lt;p&gt;As a rule of thumb, implement a graceful shutdown in your game sever process when it receives the TERM signal
from Kubernetes when the backing Pod goes into Termination state.&lt;/p&gt;
&lt;p&gt;Be aware that if you use a variation of &lt;code&gt;System.exit(0)&lt;/code&gt; after calling SDK.Shutdown(), your game server container may
restart for a brief period, inline with our &lt;a href=&#34;/site/site/docs/guides/health-checking/#health-failure-strategy&#34;&gt;Health Checking&lt;/a&gt; policies.&lt;/p&gt;
&lt;p&gt;If the SDK server receives a TERM signal before calling SDK.Shutdown(),
the SDK server will stay alive for the period of the &lt;code&gt;terminationGracePeriodSeconds&lt;/code&gt; until &lt;code&gt;SDK.Shutdown()&lt;/code&gt; has been called.&lt;/p&gt;
&lt;h3 id=&#34;configuration-retrieval&#34;&gt;Configuration Retrieval&lt;/h3&gt;
&lt;h4 id=&#34;gameserver&#34;&gt;GameServer()&lt;/h4&gt;
&lt;p&gt;This returns most of the backing GameServer configuration and Status. This can be useful
for instances where you may want to know Health check configuration, or the IP and Port
the GameServer is currently allocated to.&lt;/p&gt;
&lt;p&gt;Since the GameServer contains an entire &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/#pod-templates&#34;&gt;PodTemplate&lt;/a&gt;
the returned object is limited to that configuration that was deemed useful. If there are
areas that you feel are missing, please &lt;a href=&#34;https://github.com/googleforgames/agones/issues&#34;&gt;file an issue&lt;/a&gt; or pull request.&lt;/p&gt;
&lt;p&gt;The easiest way to see what is exposed, is to check
the
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/proto/sdk/sdk.proto&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;&lt;code&gt;sdk.proto&lt;/code&gt;&lt;/a&gt;
, specifically at
the &lt;code&gt;message GameServer&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For language specific documentation, have a look at the respective source (linked above),
and the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/examples&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;examples&lt;/a&gt;
.&lt;/p&gt;
&lt;h4 id=&#34;watchgameserverfunctiongameserver&#34;&gt;WatchGameServer(function(gameserver){&amp;hellip;})&lt;/h4&gt;
&lt;p&gt;This executes the passed in callback with the current &lt;code&gt;GameServer&lt;/code&gt; details whenever the underlying &lt;code&gt;GameServer&lt;/code&gt; configuration is updated.
This can be useful to track &lt;code&gt;GameServer &amp;gt; Status &amp;gt; State&lt;/code&gt; changes, &lt;code&gt;metadata&lt;/code&gt; changes, such as labels and annotations, and more.&lt;/p&gt;
&lt;p&gt;In combination with this SDK, manipulating &lt;a href=&#34;https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/&#34;&gt;Annotations&lt;/a&gt; and
&lt;a href=&#34;https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/&#34;&gt;Labels&lt;/a&gt; can also be a useful way to communicate information through to running game server processes from outside those processes.
This is especially useful when combined with &lt;code&gt;GameServerAllocation&lt;/code&gt; &lt;a href=&#34;/site/site/docs/reference/gameserverallocation/&#34;&gt;applied metadata&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Since the GameServer contains an entire &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/#pod-templates&#34;&gt;PodTemplate&lt;/a&gt;
the returned object is limited to that configuration that was deemed useful. If there are
areas that you feel are missing, please &lt;a href=&#34;https://github.com/googleforgames/agones/issues&#34;&gt;file an issue&lt;/a&gt; or pull request.&lt;/p&gt;
&lt;p&gt;The easiest way to see what is exposed, is to check
the
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/proto/sdk/sdk.proto&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;&lt;code&gt;sdk.proto&lt;/code&gt;&lt;/a&gt;
, specifically at
the &lt;code&gt;message GameServer&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For language specific documentation, have a look at the respective source (linked above),
and the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/examples&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;examples&lt;/a&gt;
.&lt;/p&gt;
&lt;h3 id=&#34;metadata-management&#34;&gt;Metadata Management&lt;/h3&gt;
&lt;h4 id=&#34;setlabelkey-value&#34;&gt;SetLabel(key, value)&lt;/h4&gt;
&lt;p&gt;This will set a &lt;a href=&#34;https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/&#34;&gt;Label&lt;/a&gt; value on the backing &lt;code&gt;GameServer&lt;/code&gt;
record that is stored in Kubernetes.&lt;/p&gt;
&lt;p&gt;To maintain isolation, the &lt;code&gt;key&lt;/code&gt; value is automatically prefixed with the value &lt;strong&gt;&amp;ldquo;agones.dev/sdk-&amp;rdquo;&lt;/strong&gt;. This is done for
two main reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The prefix allows the developer to always know if they are accessing or reading a value that could have come, or
may be changed by the client SDK. Much like &lt;code&gt;private&lt;/code&gt; vs &lt;code&gt;public&lt;/code&gt; scope in a programming language, the Agones
SDK only gives you access to write to part of the set of labels and annotations that exist on a GameServer.&lt;/li&gt;
&lt;li&gt;The prefix allows for a smaller attack surface if the GameServer container gets compromised. Since the
game container is generally externally exposed, and the Agones project doesn&amp;rsquo;t control the binary that is
run within it, limiting exposure if the game server becomes compromised is worth the extra
development friction that comes with having this prefix in place.&lt;/li&gt;
&lt;/ul&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;There are limits on the characters that be used for label keys and values. Details are &lt;a href=&#34;https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You will need to take them into account when combined with the label prefix above.&lt;/p&gt;


&lt;/div&gt;

&lt;p&gt;Setting &lt;code&gt;GameServer&lt;/code&gt; labels can be useful if you want information from your running game server process to be
observable or searchable through the Kubernetes API.&lt;/p&gt;
&lt;h4 id=&#34;setannotationkey-value&#34;&gt;SetAnnotation(key, value)&lt;/h4&gt;
&lt;p&gt;This will set an &lt;a href=&#34;https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/&#34;&gt;Annotation&lt;/a&gt; value
on the backing &lt;code&gt;GameServer&lt;/code&gt; record that is stored in Kubernetes.&lt;/p&gt;
&lt;p&gt;To maintain isolation, the &lt;code&gt;key&lt;/code&gt; value is automatically prefixed with &lt;strong&gt;&amp;ldquo;agones.dev/sdk-&amp;rdquo;&lt;/strong&gt; for the same reasons as
in &lt;a href=&#34;#setlabelkey-value&#34;&gt;SetLabel(&amp;hellip;)&lt;/a&gt; above. The isolation is also important as Agones uses annotations on the
&lt;code&gt;GameServer&lt;/code&gt; as part of its internal processing.&lt;/p&gt;
&lt;p&gt;Setting &lt;code&gt;GameServer&lt;/code&gt; annotations can be useful if you want information from your running game server process to be
observable through the Kubernetes API.&lt;/p&gt;
&lt;h3 id=&#34;counters-and-lists&#34;&gt;Counters And Lists&lt;/h3&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;The Counters And Lists feature is currently &lt;strong&gt;&lt;a href=&#34;/site/site/docs/guides/feature-stages/#alpha&#34;&gt;Alpha&lt;/a&gt;&lt;/strong&gt;,
        not enabled by default, and may change in the future.&lt;/p&gt;
&lt;p&gt;Use the FeatureGate  &lt;code&gt;CountsAndLists&lt;/code&gt;
to enable and test this feature.&lt;/p&gt;
    &lt;p&gt;See the &lt;a href=&#34;/site/site/docs/guides/feature-stages/#feature-gates&#34;&gt;Feature Gate documentation&lt;/a&gt; for details on how to enable features.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;Counters&lt;/code&gt; and &lt;code&gt;Lists&lt;/code&gt; features in the SDK offer a flexible configuration for tracking various entities like
players, rooms, and sessions.&lt;/p&gt;
&lt;p&gt;Declared keys and default values for Counters and Lists are specified in
&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerSpec&#34;&gt;&lt;code&gt;GameServer.Spec.Counters&lt;/code&gt; and &lt;code&gt;GameServer.Spec.Lists&lt;/code&gt;&lt;/a&gt; respectively.&lt;/p&gt;
&lt;p&gt;Modified Counter and List values and capacities will be updated
in &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Counters&lt;/code&gt; and &lt;code&gt;GameServer.Status.Lists&lt;/code&gt;&lt;/a&gt; respectively.&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;The SDK batches mutation operations every 1 second for performance reasons. However, changes made and subsequently
retrieved through the SDK will be atomically accurate through the SDK, as those values are tracked within the
SDK Server sidecar process.&lt;/p&gt;
&lt;p&gt;Changes made through Allocation or the Kubernetes API to
&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerSpec&#34;&gt;&lt;code&gt;GameServer.Spec.Counters&lt;/code&gt; and &lt;code&gt;GameServer.Spec.Lists&lt;/code&gt;&lt;/a&gt;
will be eventually consistent when being retrieved through the SDK.&lt;/p&gt;
&lt;p&gt;Since the Agones SDK server batches the update operations of
&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Counters&lt;/code&gt; and &lt;code&gt;GameServer.Status.Lists&lt;/code&gt;&lt;/a&gt;
asynchronously, this means that if you update
&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.status&lt;/code&gt;&lt;/a&gt; values
through both the SDK and the Allocation/Kubernetes API, the batch processing may silently truncate some of those values
to the capacity of that Counter or List.&lt;/p&gt;


&lt;/div&gt;

&lt;h4 id=&#34;counters&#34;&gt;Counters&lt;/h4&gt;
&lt;p&gt;All functions will return an error if the specified &lt;code&gt;key&lt;/code&gt; is not predefined in the
&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerSpec&#34;&gt;&lt;code&gt;GameServer.Spec.Counters&lt;/code&gt;&lt;/a&gt; resource configuration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; For Counters, the default setting for the capacity is preset to 1000. It is recommended to avoid configuring the capacity to max(int64), as doing so could cause problems with &lt;a href=&#34;https://github.com/googleforgames/agones/issues/3636&#34;&gt;JSON Patch operations&lt;/a&gt;.&lt;/p&gt;
&lt;h5 id=&#34;alphagetcountercountkey&#34;&gt;Alpha().GetCounterCount(key)&lt;/h5&gt;
&lt;p&gt;This function retrieves either the &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Counters[key].Count&lt;/code&gt;&lt;/a&gt; or the SDK awaiting-batch
value for a given key, whichever is most up to date.&lt;/p&gt;
&lt;h5 id=&#34;alphasetcountercountkey-amount&#34;&gt;Alpha().SetCounterCount(key, amount)&lt;/h5&gt;
&lt;p&gt;This function sets the value of &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Counters[key].Count&lt;/code&gt;&lt;/a&gt; for the given key to the
passed in amount. This operation overwrites any previous values and the new value cannot exceed the Counter&amp;rsquo;s capacity.&lt;/p&gt;
&lt;h5 id=&#34;alphaincrementcounterkey-amount&#34;&gt;Alpha().IncrementCounter(key, amount)&lt;/h5&gt;
&lt;p&gt;This function increments &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Counters[key].Count&lt;/code&gt;&lt;/a&gt; for the given key by the passed in
non-negative amount. The function returns an error if the Counter is already at capacity (at time of operation),
indicating no increment will occur.&lt;/p&gt;
&lt;h5 id=&#34;alphadecrementcounterkey-amount&#34;&gt;Alpha().DecrementCounter(key, amount)&lt;/h5&gt;
&lt;p&gt;This function decreases &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Counters[key].Count&lt;/code&gt;&lt;/a&gt; for the given key by the passed in
non-negative amount. It returns an error if the Counter&amp;rsquo;s count is already at zero.&lt;/p&gt;
&lt;h5 id=&#34;alphasetcountercapacitykey-amount&#34;&gt;Alpha().SetCounterCapacity(key, amount)&lt;/h5&gt;
&lt;p&gt;This function sets the maximum &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Counters[key].Capacity&lt;/code&gt;&lt;/a&gt; for the given key by the
passed in non-negative amount. A capacity value of 0 indicates no capacity limit.&lt;/p&gt;
&lt;h5 id=&#34;alphagetcountercapacitykey&#34;&gt;Alpha().GetCounterCapacity(key)&lt;/h5&gt;
&lt;p&gt;This function retrieves either the &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Counters[key].Capacity&lt;/code&gt;&lt;/a&gt; or the SDK
awaiting-batch value for the given key, whichever is most up to date.&lt;/p&gt;
&lt;h4 id=&#34;lists&#34;&gt;Lists&lt;/h4&gt;
&lt;p&gt;All functions will return an error if the specified &lt;code&gt;key&lt;/code&gt; is not predefined in the
&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerSpec&#34;&gt;&lt;code&gt;GameServer.Spec.Lists&lt;/code&gt;&lt;/a&gt; resource configuration.&lt;/p&gt;
&lt;h5 id=&#34;alphaappendlistvaluekey-value&#34;&gt;Alpha().AppendListValue(key, value)&lt;/h5&gt;
&lt;p&gt;This function appends the specified string value to the List
in &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Lists[key].Values&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;An error is returned if the string already exists in the list or if the list is at capacity.&lt;/p&gt;
&lt;h5 id=&#34;alphadeletelistvaluekey-value&#34;&gt;Alpha().DeleteListValue(key, value)&lt;/h5&gt;
&lt;p&gt;This function removes the specified string value from the List
in &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Lists[key].Values&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;An error is returned if the string does not exist in the list.&lt;/p&gt;
&lt;h5 id=&#34;alphasetlistcapacitykey-amount&#34;&gt;Alpha().SetListCapacity(key, amount)&lt;/h5&gt;
&lt;p&gt;This function sets the maximum capacity for the List at &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Lists[key].Capacity&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The capacity value is required to be between 0 and 1000.&lt;/p&gt;
&lt;h5 id=&#34;alphagetlistcapacitykey&#34;&gt;Alpha().GetListCapacity(key)&lt;/h5&gt;
&lt;p&gt;This function retrieves either the &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Lists[key].Capacity&lt;/code&gt;&lt;/a&gt; or the SDK
awaiting-batch value for the given key, whichever is most up to date.&lt;/p&gt;
&lt;h5 id=&#34;alphagetlistvalueskey&#34;&gt;Alpha().GetListValues(key)&lt;/h5&gt;
&lt;p&gt;This function retrieves either the &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Lists[key].Values&lt;/code&gt;&lt;/a&gt; or the SDK
awaiting-batch values array for the given key, whichever is most up to date.&lt;/p&gt;
&lt;h5 id=&#34;alphalistcontainskey-value&#34;&gt;Alpha().ListContains(key, value)&lt;/h5&gt;
&lt;p&gt;Convenience function, which returns if the specific string value exists in the results
of &lt;a href=&#34;#alphagetlistvalueskey&#34;&gt;&lt;code&gt;Alpha().GetListValues(key)&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h5 id=&#34;alphagetlistlengthkey&#34;&gt;Alpha().GetListLength(key)&lt;/h5&gt;
&lt;p&gt;Convenience function, which retrieves the length of the results of &lt;a href=&#34;#alphagetlistvalueskey&#34;&gt;&lt;code&gt;Alpha().GetListValues(key)&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;player-tracking&#34;&gt;Player Tracking&lt;/h3&gt;


&lt;div class=&#34;pageinfo pageinfo-info&#34;&gt;
&lt;p&gt;&lt;a href=&#34;/site/site/docs/guides/counters-and-lists/&#34;&gt;Counters and Lists&lt;/a&gt; will eventually replace the Alpha functionality
of Player Tracking, which will subsequently be removed from Agones.&lt;/p&gt;
&lt;p&gt;If you are currently using this Alpha feature, we would love for you to test (and ideally migrate to!) this new
functionality to Counters and Lists to ensure it meet all your needs.&lt;/p&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;
    &lt;p&gt;The Player Tracking feature is currently &lt;strong&gt;&lt;a href=&#34;/site/site/docs/guides/feature-stages/#alpha&#34;&gt;Alpha&lt;/a&gt;&lt;/strong&gt;,
        not enabled by default, and may change in the future.&lt;/p&gt;
&lt;p&gt;Use the FeatureGate  &lt;code&gt;PlayerTracking&lt;/code&gt;
to enable and test this feature.&lt;/p&gt;
    &lt;p&gt;See the &lt;a href=&#34;/site/site/docs/guides/feature-stages/#feature-gates&#34;&gt;Feature Gate documentation&lt;/a&gt; for details on how to enable features.&lt;/p&gt;
&lt;/div&gt;

&lt;h4 id=&#34;alphaplayerconnectplayerid&#34;&gt;Alpha().PlayerConnect(playerID)&lt;/h4&gt;
&lt;p&gt;This function increases the SDK’s stored player count by one, and appends this playerID to
&lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.PlayerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Players.Count&lt;/code&gt; and &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt;&lt;/a&gt;
are then set to update the player count and id list a second from now,
unless there is already an update pending, in which case the update joins that batch operation.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;PlayerConnect()&lt;/code&gt; returns true and adds the playerID to the list of playerIDs if this playerID was not already in the
list of connected playerIDs.&lt;/p&gt;
&lt;p&gt;If the playerID exists within the list of connected playerIDs, &lt;code&gt;PlayerConnect()&lt;/code&gt; will return false, and the list of
connected playerIDs will be left unchanged.&lt;/p&gt;
&lt;p&gt;An error will be returned if the playerID was not already in the list of connected playerIDs but the player capacity for
the server has been reached. The playerID will not be added to the list of playerIDs.&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;

    Do not use this method if you are manually managing &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt; and &lt;code&gt;GameServer.Status.Players.Count&lt;/code&gt;
through the Kubernetes API, as indeterminate results will occur.

&lt;/div&gt;

&lt;h4 id=&#34;alphaplayerdisconnectplayerid&#34;&gt;Alpha().PlayerDisconnect(playerID)&lt;/h4&gt;
&lt;p&gt;This function decreases the SDK’s stored player count by one, and removes the playerID from
&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.PlayerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;GameServer.Status.Players.Count&lt;/code&gt; and &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt; are then set to
update the player count and id list a second from now,
unless there is already an update pending, in which case the update joins that batch operation.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;PlayerDisconnect()&lt;/code&gt; will return true and remove the supplied playerID from the list of connected playerIDs if the
playerID value exists within the list.&lt;/p&gt;
&lt;p&gt;If the playerID was not in the list of connected playerIDs, the call will return false, and the connected playerID list
will be left unchanged.&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;

    Do not use this method if you are manually managing &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt; and &lt;code&gt;GameServer.Status.Players.Count&lt;/code&gt;
through the Kubernetes API, as indeterminate results will occur.

&lt;/div&gt;

&lt;h4 id=&#34;alphasetplayercapacitycount&#34;&gt;Alpha().SetPlayerCapacity(count)&lt;/h4&gt;
&lt;p&gt;Update the &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.PlayerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Players.Capacity&lt;/code&gt;&lt;/a&gt; value with a new capacity.&lt;/p&gt;
&lt;h4 id=&#34;alphagetplayercapacity&#34;&gt;Alpha().GetPlayerCapacity()&lt;/h4&gt;
&lt;p&gt;This function retrieves the current player capacity. This is always accurate from what has been set through this SDK,
even if the value has yet to be updated on the GameServer status resource.&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;

    If &lt;code&gt;GameServer.Status.Players.Capacity&lt;/code&gt; is set manually through the Kubernetes API, use &lt;code&gt;SDK.GameServer()&lt;/code&gt; or
&lt;code&gt;SDK.WatchGameServer()&lt;/code&gt; instead to view this value.

&lt;/div&gt;

&lt;h4 id=&#34;alphagetplayercount&#34;&gt;Alpha().GetPlayerCount()&lt;/h4&gt;
&lt;p&gt;This function retrieves the current player count.
This is always accurate from what has been set through this SDK, even if the value has yet to be updated on the
GameServer status resource.&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;

    If &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt; is set manually through the Kubernetes API, use SDK.GameServer()
or SDK.WatchGameServer() instead to retrieve the current player count.

&lt;/div&gt;

&lt;h4 id=&#34;alphaisplayerconnectedplayerid&#34;&gt;Alpha().IsPlayerConnected(playerID)&lt;/h4&gt;
&lt;p&gt;This function returns if the playerID is currently connected to the GameServer. This is always accurate from what has
been set through this SDK,
even if the value has yet to be updated on the GameServer status resource.&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;

    If &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt; is set manually through the Kubernetes API, use SDK.GameServer()
or SDK.WatchGameServer() instead to determine connected status.

&lt;/div&gt;

&lt;h4 id=&#34;alphagetconnectedplayers&#34;&gt;Alpha().GetConnectedPlayers()&lt;/h4&gt;
&lt;p&gt;This function returns the list of the currently connected player ids. This is always accurate from what has been set
through this SDK, even if the value has yet to be updated on the GameServer status resource.&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;

    If &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt; is set manually through the Kubernetes API, use SDK.GameServer()
or SDK.WatchGameServer() instead to list the connected players.

&lt;/div&gt;

&lt;h2 id=&#34;writing-your-own-sdk&#34;&gt;Writing your own SDK&lt;/h2&gt;
&lt;p&gt;If there isn&amp;rsquo;t an SDK for the language and platform you are looking for, you have several options:&lt;/p&gt;
&lt;h3 id=&#34;grpc-client-generation&#34;&gt;gRPC Client Generation&lt;/h3&gt;
&lt;p&gt;If client generation is well supported by &lt;a href=&#34;https://grpc.io/docs/&#34;&gt;gRPC&lt;/a&gt;, then generate client(s) from
the proto files found in the
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/proto/sdk&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;&lt;code&gt;proto/sdk&lt;/code&gt;&lt;/a&gt;
,
directory and look at the current 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/sdks&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;sdks&lt;/a&gt;
 to see how the wrappers are
implemented to make interaction with the SDK server simpler for the user.&lt;/p&gt;
&lt;h3 id=&#34;rest-api-implementation&#34;&gt;REST API Implementation&lt;/h3&gt;
&lt;p&gt;If client generation is not well supported by gRPC, or if there are other complicating factors, implement the SDK through
the &lt;a href=&#34;/site/site/docs/guides/client-sdks/rest/&#34;&gt;REST&lt;/a&gt; HTTP+JSON interface. This could be written by hand, or potentially generated from
the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/sdks/swagger&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Swagger/OpenAPI Specifications&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;Finally, if you build something that would be usable by the community, please submit a pull request!&lt;/p&gt;
&lt;h2 id=&#34;sdk-conformance-test&#34;&gt;SDK Conformance Test&lt;/h2&gt;
&lt;p&gt;There is a tool &lt;code&gt;SDK server Conformance&lt;/code&gt; checker which will run Local SDK server and record all requests your client is performing.&lt;/p&gt;
&lt;p&gt;In order to check that SDK is working properly you should write simple SDK test client which would use all methods of your SDK.&lt;/p&gt;
&lt;p&gt;Also to test that SDK client is receiving valid Gameserver data, your binary should set the same &lt;code&gt;Label&lt;/code&gt; value as creation timestamp which you will receive as a result of GameServer() call and &lt;code&gt;Annotation&lt;/code&gt; value same as gameserver UID received by Watch gameserver callback.&lt;/p&gt;
&lt;p&gt;Complete list of endpoints which should be called by your test client is the following:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ready,allocate,setlabel,setannotation,gameserver,health,shutdown,watch
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In order to run this test SDK server locally use:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SECONDS=30 make run-sdk-conformance-local
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Docker container would timeout in 30 seconds and give your the comparison of received requests and expected requests&lt;/p&gt;
&lt;p&gt;For instance you could run Go SDK conformance test and see how the process goes:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SDK_FOLDER=go make run-sdk-conformance-test
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In order to add test client for your SDK, write &lt;code&gt;sdktest.sh&lt;/code&gt; and &lt;code&gt;Dockerfile&lt;/code&gt;. Refer to 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/build/build-sdk-images/go&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Golang SDK Conformance testing directory structure&lt;/a&gt;
.&lt;/p&gt;
&lt;h2 id=&#34;building-the-tools&#34;&gt;Building the Tools&lt;/h2&gt;
&lt;p&gt;If you wish to build the binaries from source
the &lt;code&gt;make&lt;/code&gt; target &lt;code&gt;build-agones-sdk-binary&lt;/code&gt; will compile the necessary binaries
for all supported operating systems (64 bit windows, linux and osx).&lt;/p&gt;
&lt;p&gt;You can find the binaries in the &lt;code&gt;bin&lt;/code&gt; folder in 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/cmd/sdk-server&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;`cmd/sdk-server`&lt;/a&gt;

once compilation is complete.&lt;/p&gt;
&lt;p&gt;See 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/main/build&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Developing, Testing and Building Agones&lt;/a&gt;
 for more details.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Windows Gameservers</title>
      <link>/site/docs/guides/windows-gameservers/</link>
      <pubDate>Mon, 19 Apr 2021 21:14:19 +0000</pubDate>
      
      <guid>/site/docs/guides/windows-gameservers/</guid>
      <description>
        
        
        

&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;

    Running &lt;code&gt;GameServers&lt;/code&gt; on Windows nodes is currently Alpha, and any feedback
would be appreciated.

&lt;/div&gt;

&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;

&lt;p&gt;The following prerequisites are required to create a GameServer:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A Kubernetes cluster with the UDP port range 7000-8000 open on each node.&lt;/li&gt;
&lt;li&gt;Agones controller installed in the targeted cluster&lt;/li&gt;
&lt;li&gt;kubectl properly configured&lt;/li&gt;
&lt;li&gt;Netcat which is already installed on most Linux/macOS distributions, for windows you can use &lt;a href=&#34;https://docs.microsoft.com/en-us/windows/wsl/install-win10&#34;&gt;WSL&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you don’t have a Kubernetes cluster you can follow &lt;a href=&#34;/site/site/docs/installation/&#34;&gt;these instructions&lt;/a&gt; to create a cluster on Google Kubernetes Engine (GKE), Minikube or Azure Kubernetes Service (AKS), and install Agones.&lt;/p&gt;
&lt;p&gt;For the purpose of this guide we’re going to use the
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/examples/simple-game-server/&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;simple-game-server&lt;/a&gt;
 example as the GameServer container. This example is a very simple UDP server written in Go. Don’t hesitate to look at the code of this example for more information.&lt;/p&gt;


&lt;p&gt;Ensure that you have some nodes to your cluster that are running Windows.&lt;/p&gt;
&lt;h2 id=&#34;objectives&#34;&gt;Objectives&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Create a GameServer on a Windows node.&lt;/li&gt;
&lt;li&gt;Connect to the GameServer.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;1-create-a-gameserver&#34;&gt;1. Create a GameServer&lt;/h3&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;

    Starting with version 0.3, the
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/examples/simple-game-server/&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;simple-game-server&lt;/a&gt;
example is compiled as a multi-arch docker image that will run on both Linux and Windows. To ensure that the game server runs on a Windows node, a nodeSelector of &lt;code&gt;&amp;quot;kubernetes.io/os&amp;quot;: windows&lt;/code&gt; must be added to the game server specification.

&lt;/div&gt;

&lt;p&gt;Create a GameServer using 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 create -f https://raw.githubusercontent.com/googleforgames/agones/release-1.39.0/examples/simple-game-server/gameserver-windows.yaml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You should see a successful output similar to this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;gameserver.agones.dev/simple-game-server-4ss4j created
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Verify that the GameServer becomes Ready by 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 gameservers
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It should look something like this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;NAME                       STATE     ADDRESS       PORT   NODE     AGE
simple-game-server-7pjrq   Ready   35.233.183.43   7190   agones   3m
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Take a note of the Game Server IP address and ports.&lt;/p&gt;
&lt;p&gt;For the full details of the YAML file head to the &lt;a href=&#34;/site/site/docs/reference/gameserver/&#34;&gt;GameServer Specification Guide&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;2-connect-to-the-gameserver&#34;&gt;2. Connect to the GameServer&lt;/h3&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;

    If you have Agones installed on Google Kubernetes Engine, and are using
Cloud Shell for your terminal, UDP is blocked. For this step, we recommend
SSH&amp;rsquo;ing into a running VM in your project, such as a Kubernetes node.
You can click the &amp;lsquo;SSH&amp;rsquo; button on the &lt;a href=&#34;https://console.cloud.google.com/compute/instances&#34;&gt;Google Compute Engine Instances&lt;/a&gt;
page to do this.
Run &lt;code&gt;toolbox&lt;/code&gt; on GKE Node to run docker container with tools and then &lt;code&gt;nc&lt;/code&gt; command would be available.

&lt;/div&gt;

&lt;p&gt;You can now communicate with the Game Server:&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;If you do not have netcat installed
(i.e. you get a response of &lt;code&gt;nc: command not found&lt;/code&gt;),
you can install netcat by running &lt;code&gt;sudo apt install netcat&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you are on Windows, you can alternatively install netcat on
&lt;a href=&#34;https://docs.microsoft.com/en-us/windows/wsl/install-win10&#34;&gt;WSL&lt;/a&gt;,
or download a version of netcat for Windows from &lt;a href=&#34;https://nmap.org/ncat/&#34;&gt;nmap.org&lt;/a&gt;.&lt;/p&gt;


&lt;/div&gt;

&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;nc -u {IP} {PORT}
Hello World !
ACK: Hello World !
EXIT
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can finally type &lt;code&gt;EXIT&lt;/code&gt; which tells the SDK to run the &lt;a href=&#34;/site/site/docs/guides/client-sdks/#shutdown&#34;&gt;Shutdown command&lt;/a&gt;, and therefore shuts down the &lt;code&gt;GameServer&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you run &lt;code&gt;kubectl describe gameserver&lt;/code&gt; again - either the GameServer will be gone completely, or it will be in &lt;code&gt;Shutdown&lt;/code&gt; state, on the way to being deleted.&lt;/p&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;Next Steps&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Make a local copy of the simple-game-server 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/examples/simple-game-server/fleet.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;fleet configuration&lt;/a&gt;
,
modify it to include a node selector, and use it to go through the &lt;a href=&#34;/site/site/docs/getting-started/create-fleet/&#34;&gt;Quickstart: Create a Game Server Fleet&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;If you want to use your own GameServer container make sure you have properly integrated the &lt;a href=&#34;/site/site/docs/guides/client-sdks/&#34;&gt;Agones SDK&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Fleet Updates</title>
      <link>/site/docs/guides/fleet-updates/</link>
      <pubDate>Tue, 27 Aug 2019 03:58:19 +0000</pubDate>
      
      <guid>/site/docs/guides/fleet-updates/</guid>
      <description>
        
        
        &lt;h2 id=&#34;rolling-update-strategy&#34;&gt;Rolling Update Strategy&lt;/h2&gt;
&lt;p&gt;When Fleets are edited and updated, the default strategy of Agones is to roll the new version of the &lt;code&gt;GameServer&lt;/code&gt;
out to the entire &lt;code&gt;Fleet&lt;/code&gt;, in a step by step increment and decrement by adding a chunk of the new version and removing
a chunk of the current set of &lt;code&gt;GameServers&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This is done while ensuring that &lt;code&gt;Allocated&lt;/code&gt; &lt;code&gt;GameServers&lt;/code&gt; are not deleted
until they are specifically shutdown through the game servers SDK, as they are expected to have players on them.&lt;/p&gt;
&lt;p&gt;You can see this in the &lt;code&gt;Fleet.Spec.Strategy&lt;/code&gt; &lt;a href=&#34;/site/site/docs/reference/fleet/&#34;&gt;reference&lt;/a&gt;, with controls for how
much of the &lt;code&gt;Fleet&lt;/code&gt; is  incremented and decremented at one time:&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:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;strategy&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;type&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;RollingUpdate&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;rollingUpdate&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;maxSurge&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;25&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;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;maxUnavailable&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;25&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;So when a Fleet is edited (any field other than &lt;code&gt;replicas&lt;/code&gt;, see note below), either through &lt;code&gt;kubectl&lt;/code&gt; &lt;code&gt;edit&lt;/code&gt;/&lt;code&gt;apply&lt;/code&gt; or via the Kubernetes API, this performs the following operations:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Adds the &lt;code&gt;maxSurge&lt;/code&gt; number of &lt;code&gt;GameServers&lt;/code&gt; to the Fleet.&lt;/li&gt;
&lt;li&gt;Shutdown the &lt;code&gt;maxUnavailable&lt;/code&gt; number of &lt;code&gt;GameServers&lt;/code&gt; in the Fleet, skipping &lt;code&gt;Allocated&lt;/code&gt; &lt;code&gt;GameServers&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Repeat above steps until all the previous &lt;code&gt;GameServer&lt;/code&gt; configurations have been &lt;code&gt;Shutdown&lt;/code&gt; and deleted.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By default, a Fleet will wait for new &lt;code&gt;GameSevers&lt;/code&gt; to become &lt;code&gt;Ready&lt;/code&gt; during a Rolling Update before continuing to shutdown additional &lt;code&gt;GameServers&lt;/code&gt;, only counting &lt;code&gt;GameServers&lt;/code&gt; that are &lt;code&gt;Ready&lt;/code&gt; as being available when calculating the current &lt;code&gt;maxUnavailable&lt;/code&gt; value which controls the rate at which &lt;code&gt;GameServers&lt;/code&gt; are updated.
This ensures that a Fleet cannot accidentally have zero &lt;code&gt;GameServers&lt;/code&gt; in the &lt;code&gt;Ready&lt;/code&gt; state if something goes wrong during a Rolling Update or if &lt;code&gt;GameServers&lt;/code&gt; have a long delay before moving to the &lt;code&gt;Ready&lt;/code&gt; state.&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;When &lt;code&gt;Fleet&lt;/code&gt; update contains only changes to the &lt;code&gt;replicas&lt;/code&gt; parameter, then new GameServers will be created/deleted straight away,
which means in that case &lt;code&gt;maxSurge&lt;/code&gt; and &lt;code&gt;maxUnavailable&lt;/code&gt; parameters for a RollingUpdate will not be used.
The RollingUpdate strategy takes place when you update &lt;code&gt;spec&lt;/code&gt; parameters other than &lt;code&gt;replicas&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you are using a Fleet which is scaled by a FleetAutoscaler, &lt;a href=&#34;/site/site/docs/getting-started/create-fleetautoscaler/#7-change-autoscaling-parameters&#34;&gt;read the Fleetautoscaler guide&lt;/a&gt; for more details on how RollingUpdates with FleetAutoscalers need to be implemented.&lt;/p&gt;
&lt;p&gt;You could also check the behaviour of the Fleet with a RollingUpdate strategy on a test &lt;code&gt;Fleet&lt;/code&gt; to preview your upcoming updates.
Use &lt;code&gt;kubectl describe fleet&lt;/code&gt; to track scaling events in a Fleet.&lt;/p&gt;


&lt;/div&gt;

&lt;h2 id=&#34;recreate-strategy&#34;&gt;Recreate Strategy&lt;/h2&gt;
&lt;p&gt;This is an optimal &lt;code&gt;Fleet&lt;/code&gt; update strategy if you want to replace all &lt;code&gt;GameServers&lt;/code&gt; that are not &lt;code&gt;Allocated&lt;/code&gt;
with a new version as quickly as possible.&lt;/p&gt;
&lt;p&gt;You can see this in the &lt;code&gt;Fleet.Spec.Strategy&lt;/code&gt; &lt;a href=&#34;/site/site/docs/reference/fleet/&#34;&gt;reference&lt;/a&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-yaml&#34; data-lang=&#34;yaml&#34;&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;strategy&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;type&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;Recreate&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;So when a Fleet is edited, either through &lt;code&gt;kubectl&lt;/code&gt; &lt;code&gt;edit&lt;/code&gt;/&lt;code&gt;apply&lt;/code&gt; or via the Kubernetes API, this performs the following operations:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;Shutdown&lt;/code&gt; all &lt;code&gt;GameServers&lt;/code&gt; in the Fleet that are not currently &lt;code&gt;Allocated&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Create the same number of the new version of the &lt;code&gt;GameServers&lt;/code&gt; that were previously deleted.&lt;/li&gt;
&lt;li&gt;Repeat above steps until all the previous &lt;code&gt;GameServer&lt;/code&gt; configurations have been &lt;code&gt;Shutdown&lt;/code&gt; and deleted.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;two-or-more-fleets-strategy&#34;&gt;Two (or more) Fleets Strategy&lt;/h2&gt;
&lt;p&gt;If you want very fine-grained control over the rate that new versions of a &lt;code&gt;GameServer&lt;/code&gt; configuration is rolled out, or
if you want to do some version of A/B testing or smoke test between different versions, running two (or more) &lt;code&gt;Fleets&lt;/code&gt; at the same time is a
good solution for this.&lt;/p&gt;
&lt;p&gt;To do this, create a second &lt;code&gt;Fleet&lt;/code&gt; inside your cluster, starting with zero replicas. From there you can scale this newer &lt;code&gt;Fleet&lt;/code&gt;
up and the older &lt;code&gt;Fleet&lt;/code&gt; down as required by your specific rollout strategy.&lt;/p&gt;
&lt;p&gt;This also allows you to rollback if issues arise with the newer version, as you can delete the newer &lt;code&gt;Fleet&lt;/code&gt;
and scale up the old Fleet to its previous levels, resulting in minimal impact to the players.&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;

    For GameServerAllocation, you will need to have at least a single shared label between the &lt;code&gt;GameServers&lt;/code&gt; in each
Fleet.

&lt;/div&gt;

&lt;h3 id=&#34;gameserverallocation-across-fleets&#34;&gt;GameServerAllocation Across Fleets&lt;/h3&gt;
&lt;p&gt;Since &lt;code&gt;GameServerAllocation&lt;/code&gt; is powered by label selectors, it is possible to allocate across multiple fleets, and/or
give preference to particular sets of &lt;code&gt;GameServers&lt;/code&gt; over others. You can see details of this in
the &lt;code&gt;GameServerAllocation&lt;/code&gt; &lt;a href=&#34;/site/site/docs/reference/gameserverallocation/&#34;&gt;reference&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In a scenario where a new &lt;code&gt;v2&lt;/code&gt; version of a &lt;code&gt;Fleet&lt;/code&gt; is being slowly scaled up in a separate Fleet from the previous &lt;code&gt;v1&lt;/code&gt;
Fleet, we can specify that we &lt;code&gt;prefer&lt;/code&gt; allocation to occur from the &lt;code&gt;v2&lt;/code&gt; Fleet, and if none are available, fallback to
the &lt;code&gt;v1&lt;/code&gt; Fleet, like so:&lt;/p&gt;

  
  
&lt;ul class=&#34;nav nav-tabs&#34; id=&#34;tabs-5&#34; role=&#34;tablist&#34;&gt;
  &lt;li class=&#34;nav-item&#34;&gt;
      &lt;button class=&#34;nav-link active persistLang-yaml&#34;
          id=&#34;tabs-05-00-tab&#34; data-bs-toggle=&#34;tab&#34; data-bs-target=&#34;#tabs-05-00&#34; role=&#34;tab&#34;
          onclick=&#34;persistLang(&amp;#34;yaml&amp;#34;);&#34;aria-controls=&#34;tabs-05-00&#34; aria-selected=&#34;true&#34;&gt;
        selectors
      &lt;/button&gt;
    &lt;/li&gt;&lt;li class=&#34;nav-item&#34;&gt;
      &lt;button class=&#34;nav-link&#34;
          id=&#34;tabs-05-01-tab&#34; data-bs-toggle=&#34;tab&#34; data-bs-target=&#34;#tabs-05-01&#34; role=&#34;tab&#34;
          aria-controls=&#34;tabs-05-01&#34; aria-selected=&#34;false&#34;&gt;
        required &amp;amp; preferred (deprecated)
      &lt;/button&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;tab-content&#34; id=&#34;tabs-5-content&#34;&gt;
    &lt;div class=&#34;tab-pane fade show active&#34;
        id=&#34;tabs-05-00&#34; role=&#34;tabpanel&#34; aria-labelled-by=&#34;tabs-05-00-tab&#34; tabindex=&#34;5&#34;&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;allocation.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;GameServerAllocation&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;selectors&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;matchLabels&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;agones.dev/fleet&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;v2&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;matchLabels&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;game&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-awesome-game&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&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class=&#34;tab-pane fade&#34;
        id=&#34;tabs-05-01&#34; role=&#34;tabpanel&#34; aria-labelled-by=&#34;tabs-05-01-tab&#34; tabindex=&#34;5&#34;&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;allocation.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;GameServerAllocation&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:#8f5902;font-style:italic&#34;&gt;# Deprecated, use field selectors instead.&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;required&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;matchLabels&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;game&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-awesome-game&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:#8f5902;font-style:italic&#34;&gt;# Deprecated, use field selectors instead.&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;preferred&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;matchLabels&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;agones.dev/fleet&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;v2&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&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;In this example, all &lt;code&gt;GameServers&lt;/code&gt; have the label &lt;code&gt;game: my-awesome-game&lt;/code&gt;, so the Allocation will search across both
Fleets through that mechanism. The &lt;code&gt;selectors&lt;/code&gt; label matching selector tells the allocation system to first search
all &lt;code&gt;GameServers&lt;/code&gt; with the &lt;code&gt;v2&lt;/code&gt; &lt;code&gt;Fleet&lt;/code&gt; label, and if not found, search through the rest of the set.&lt;/p&gt;
&lt;p&gt;The above &lt;code&gt;GameServerAllocation&lt;/code&gt; can then be used while you scale up the &lt;code&gt;v2&lt;/code&gt; Fleet and scale down the original Fleet at
the rate that you deem fit for your specific rollout.&lt;/p&gt;
&lt;h2 id=&#34;notifying-gameservers-on-fleet-updatedownscale&#34;&gt;Notifying GameServers on Fleet Update/Downscale&lt;/h2&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;The Allocated GameSever Overflow Notification feature is currently &lt;strong&gt;&lt;a href=&#34;/site/site/docs/guides/feature-stages/#beta&#34;&gt;Beta&lt;/a&gt;&lt;/strong&gt;,
        and while it is enabled by default it may change in the future.&lt;/p&gt;
    &lt;p&gt;Use the Feature Gate &lt;code&gt;FleetAllocationOverflow&lt;/code&gt; to disable this feature.&lt;/p&gt;
    &lt;p&gt;See the &lt;a href=&#34;/site/site/docs/guides/feature-stages/#feature-gates&#34;&gt;Feature Gate documentation&lt;/a&gt; for details on how to disable features.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;When &lt;code&gt;Allocated&lt;/code&gt; &lt;code&gt;GameServers&lt;/code&gt; are utilised for a long time, such as a Lobby &lt;code&gt;GameServer&lt;/code&gt;,
or a &lt;code&gt;GameServer&lt;/code&gt; that is being reused multiple times in a row, it can be useful
to notify an &lt;code&gt;Allocated&lt;/code&gt; &lt;code&gt;GameServer&lt;/code&gt; process when its backing Fleet has been updated.
When an update occurs, the &lt;code&gt;Allocated&lt;/code&gt; &lt;code&gt;GameServer&lt;/code&gt;, may want to actively perform a graceful shutdown and release its
resources such that it can be replaced by a new version, or similar actions.&lt;/p&gt;
&lt;p&gt;To do this, we provide the ability to apply a user-provided set of labels and/or annotations to the &lt;code&gt;Allocated&lt;/code&gt;
&lt;code&gt;GameServers&lt;/code&gt; when a &lt;code&gt;Fleet&lt;/code&gt; update occurs that updates its &lt;code&gt;GameServer&lt;/code&gt; template, or generally
causes the &lt;code&gt;Fleet&lt;/code&gt; replica count to drop below the number of currently &lt;code&gt;Allocated&lt;/code&gt; &lt;code&gt;GameServers&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This provides two useful capabilities:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The &lt;code&gt;GameServer&lt;/code&gt; &lt;a href=&#34;/site/site/docs/guides/client-sdks/#watchgameserverfunctiongameserver&#34;&gt;&lt;code&gt;SDK.WatchGameServer()&lt;/code&gt;&lt;/a&gt;
command can be utilised to react to this annotation and/or label change to
indicate the Fleet system change, and the game server binary could execute code accordingly.&lt;/li&gt;
&lt;li&gt;This can also be used to proactively update &lt;code&gt;GameServer&lt;/code&gt; labels, to effect change in allocation strategy - such as
preferring the newer &lt;code&gt;GameServers&lt;/code&gt; when allocating, but falling back to the older version if there aren&amp;rsquo;t enough
of the new ones yet spun up.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The labels and/or annotations are applied to &lt;code&gt;GameServers&lt;/code&gt; in a &lt;code&gt;Fleet&lt;/code&gt; in the order designated by their configured &lt;a href=&#34;/site/site/docs/advanced/scheduling-and-autoscaling/#fleet-scheduling&#34;&gt;Fleet scheduling&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Example yaml configuration:&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;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;2&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;allocationOverflow&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:#8f5902;font-style:italic&#34;&gt;# This specifies which annotations and/or labels are applied&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;labels&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;mykey&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;myvalue&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;version&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;&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;# empty an existing label value, so it&amp;#39;s no longer in the allocation selection&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;annotations&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;event&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;overflow&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;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.27&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;See the &lt;a href=&#34;/site/site/docs/reference/fleet/&#34;&gt;Fleet reference&lt;/a&gt; for more details.&lt;/p&gt;
&lt;!-- This is the only way I could get the alert to work in a feature code --&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;

    This works the same across Fleet resizing and Rolling/Recreate Updates, in that the implementation responds to the
underlying &lt;code&gt;GameServerSet&lt;/code&gt;&amp;rsquo;s replicas being shrunk to a value smaller than the number of &lt;code&gt;Allocated&lt;/code&gt;
&lt;code&gt;GameServers&lt;/code&gt; it controls. Therefore, this functionality works equally well with a rolling update as it does with an
update strategy that requires at least two &lt;code&gt;Fleets&lt;/code&gt;.

&lt;/div&gt;


      </description>
    </item>
    
    <item>
      <title>Docs: GameServer Health Checking</title>
      <link>/site/docs/guides/health-checking/</link>
      <pubDate>Thu, 03 Jan 2019 01:20:19 +0000</pubDate>
      
      <guid>/site/docs/guides/health-checking/</guid>
      <description>
        
        
        &lt;h2 id=&#34;disabling-health-checking&#34;&gt;Disabling Health Checking&lt;/h2&gt;
&lt;p&gt;By default, health checking is enabled, but it can be turned off by setting the &lt;code&gt;spec.health.disabled&lt;/code&gt; property to
true.&lt;/p&gt;
&lt;h2 id=&#34;sdk-api&#34;&gt;SDK API&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;Health()&lt;/code&gt; function on the &lt;a href=&#34;/site/site/docs/guides/client-sdks/&#34;&gt;SDK object&lt;/a&gt; needs to be called at an
interval less than the &lt;code&gt;spec.health.periodSeconds&lt;/code&gt;
threshold time to be considered before it will be considered a &lt;code&gt;failure&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The health check will also need to have not been called a consecutive number of times (&lt;code&gt;spec.health.failureThreshold&lt;/code&gt;),
giving it a chance to heal if it there is an issue.&lt;/p&gt;
&lt;h2 id=&#34;health-failure-strategy&#34;&gt;Health Failure Strategy&lt;/h2&gt;
&lt;p&gt;The following is the process for what happens to a &lt;code&gt;GameServer&lt;/code&gt; when it is unhealthy.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If the &lt;code&gt;GameServer&lt;/code&gt; container exits with an error before the &lt;code&gt;GameServer&lt;/code&gt; moves to &lt;code&gt;Ready&lt;/code&gt; then,
it is restarted as per the &lt;code&gt;restartPolicy&lt;/code&gt; (which defaults to &amp;ldquo;Always&amp;rdquo;).&lt;/li&gt;
&lt;li&gt;If the &lt;code&gt;GameServer&lt;/code&gt; fails health checking at any point, then it doesn&amp;rsquo;t restart,
but moves to an &lt;code&gt;Unhealthy&lt;/code&gt; state.&lt;/li&gt;
&lt;li&gt;If the &lt;code&gt;GameServer&lt;/code&gt; container exits while in &lt;code&gt;Ready&lt;/code&gt;, &lt;code&gt;Allocated&lt;/code&gt; or &lt;code&gt;Reserved&lt;/code&gt; state, it will be restarted
as per the &lt;code&gt;restartPolicy&lt;/code&gt;  (which defaults to &amp;ldquo;Always&amp;rdquo;, since &lt;code&gt;RestartPolicy&lt;/code&gt; is a &lt;code&gt;Pod&lt;/code&gt; wide setting),
but will immediately move to an &lt;code&gt;Unhealthy&lt;/code&gt; state.&lt;/li&gt;
&lt;li&gt;If the SDK sidecar fails, then it will be restarted, assuming the &lt;code&gt;RestartPolicy&lt;/code&gt; is Always/OnFailure.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;fleet-management-of-unhealthy-gameservers&#34;&gt;Fleet Management of Unhealthy GameServers&lt;/h2&gt;
&lt;p&gt;If a &lt;code&gt;GameServer&lt;/code&gt; moves into an &lt;code&gt;Unhealthy&lt;/code&gt; state when it is not part of a Fleet, the &lt;code&gt;GameServer&lt;/code&gt; will remain in the
Unhealthy state until explicitly deleted.  This is useful for debugging &lt;code&gt;Unhealthy&lt;/code&gt; &lt;code&gt;GameServers&lt;/code&gt;, or if you are
creating your own &lt;code&gt;GameServer&lt;/code&gt; management layer, you can explicitly choose what to do if a &lt;code&gt;GameServer&lt;/code&gt; becomes
&lt;code&gt;Unhealthy&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If a &lt;code&gt;GameServer&lt;/code&gt; is part of a &lt;code&gt;Fleet&lt;/code&gt;, the &lt;code&gt;Fleet&lt;/code&gt; management system will &lt;em&gt;delete&lt;/em&gt; any &lt;code&gt;Unhealthy&lt;/code&gt; &lt;code&gt;GameServers&lt;/code&gt; and
immediately replace them with a brand new &lt;code&gt;GameServer&lt;/code&gt; to ensure it has the configured number of Replicas.&lt;/p&gt;
&lt;h2 id=&#34;configuration-reference&#34;&gt;Configuration Reference&lt;/h2&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:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Health checking for the running 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;health&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:#8f5902;font-style:italic&#34;&gt;# Disable health checking. defaults to false, but can be set to true&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;disabled&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:#204a87;font-weight:bold&#34;&gt;false&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:#8f5902;font-style:italic&#34;&gt;# Number of seconds after the container has started before health check is initiated. Defaults to 5 seconds&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;initialDelaySeconds&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;5&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:#8f5902;font-style:italic&#34;&gt;# If the `Health()` function doesn&amp;#39;t get called at least once every period (seconds), then&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:#8f5902;font-style:italic&#34;&gt;# the game server is not healthy. Defaults to 5&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;periodSeconds&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;5&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:#8f5902;font-style:italic&#34;&gt;# Minimum consecutive failures for the health probe to be considered failed after having succeeded.&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:#8f5902;font-style:italic&#34;&gt;# Defaults to 3. Minimum value is 1&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;failureThreshold&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;3&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;See the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/examples/gameserver.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;full GameServer example&lt;/a&gt;
 for more details&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;h3 id=&#34;c&#34;&gt;C++&lt;/h3&gt;
&lt;p&gt;For a configuration that requires a health ping every 5 seconds, the example below sends a request every 2 seconds
to be sure that the GameServer is under the threshold.&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-cpp&#34; data-lang=&#34;cpp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;void&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;doHealth&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;agones&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;SDK&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;sdk&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;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:#204a87;font-weight:bold&#34;&gt;while&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#204a87&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;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:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;sdk&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Health&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;())&lt;/span&gt; &lt;span style=&#34;color:#000;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;std&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;cout&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Health ping failed&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;std&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;endl&lt;/span&gt;&lt;span style=&#34;color:#000;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;font-weight:bold&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;else&lt;/span&gt; &lt;span style=&#34;color:#000;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;std&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;cout&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Health ping sent&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;std&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;endl&lt;/span&gt;&lt;span style=&#34;color:#000;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;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;std&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;this_thread&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;sleep_for&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;std&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;chrono&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;seconds&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;2&lt;/span&gt;&lt;span style=&#34;color:#000;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;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;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:#204a87;font-weight:bold&#34;&gt;int&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;main&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt; &lt;span style=&#34;color:#000;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;agones&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;SDK&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;sdk&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;new&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;agones&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;SDK&lt;/span&gt;&lt;span style=&#34;color:#000;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:#204a87;font-weight:bold&#34;&gt;bool&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;connected&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;sdk&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Connect&lt;/span&gt;&lt;span style=&#34;color:#000;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:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;connected&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;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:#204a87;font-weight:bold&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#000;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;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;std&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;thread&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;health&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;doHealth&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;sdk&lt;/span&gt;&lt;span style=&#34;color:#000;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;// ...  run the game server code
&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;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;full-game-server&#34;&gt;Full Game Server&lt;/h3&gt;
&lt;p&gt;Also look in the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/examples&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;examples&lt;/a&gt;
 directory.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: GameServer Counters and Lists</title>
      <link>/site/docs/guides/counters-and-lists/</link>
      <pubDate>Mon, 08 Jan 2024 00:00:00 +0000</pubDate>
      
      <guid>/site/docs/guides/counters-and-lists/</guid>
      <description>
        
        
        
&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;The Counters and Lists feature is currently &lt;strong&gt;&lt;a href=&#34;/site/site/docs/guides/feature-stages/#alpha&#34;&gt;Alpha&lt;/a&gt;&lt;/strong&gt;,
        not enabled by default, and may change in the future.&lt;/p&gt;
&lt;p&gt;Use the FeatureGate  &lt;code&gt;CountsAndLists&lt;/code&gt;
to enable and test this feature.&lt;/p&gt;
    &lt;p&gt;See the &lt;a href=&#34;/site/site/docs/guides/feature-stages/#feature-gates&#34;&gt;Feature Gate documentation&lt;/a&gt; for details on how to enable features.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;Counters and Lists is provided as a way to track arbitrary integer counter values as well as
lists of values against a &lt;code&gt;GameServer&lt;/code&gt; by a user provided key.&lt;/p&gt;
&lt;p&gt;Combined with the ability to set and manipulate max capacity values at runtime for each counter and list, allows
Agones to also provide Allocation, Fleet scheduling and Fleet autoscaling based on this functionality, such that it
supports a wide variety of use cases, including, but not limited to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Connected player listing tracking, Allocation filtering and autoscaling based on available capacity.&lt;/li&gt;
&lt;li&gt;Multi-tenant server room counting, Allocation filtering and autoscaling based on available capacity.&lt;/li&gt;
&lt;li&gt;Game specific GameServer weighting on Allocation.&lt;/li&gt;
&lt;li&gt;&amp;hellip;any other use case that requires a list of values or a counter aligned with a GameServer for tracking purposes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;declaration&#34;&gt;Declaration&lt;/h2&gt;
&lt;p&gt;All keys for either Counters and Lists must be declared at creation time within the
&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerSpec&#34;&gt;GameServerSpec&lt;/a&gt; before being
utilised, and keys cannot be added or deleted from &lt;code&gt;GameServers&lt;/code&gt; past their initial creation.&lt;/p&gt;
&lt;p&gt;For example, if we want to use a Counter of &lt;code&gt;rooms&lt;/code&gt; to track the number of game session rooms that exist in
this &lt;code&gt;GameServer&lt;/code&gt; instance, while also tracking a List of currently connected &lt;code&gt;players&lt;/code&gt;, we could
implement the following:&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:#000&#34;&gt;agones.dev/v1&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;2&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;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;counters&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;rooms&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:#8f5902;font-style:italic&#34;&gt;# room counter&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;count&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;0&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;capacity&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;10&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;lists&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;players&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:#8f5902;font-style:italic&#34;&gt;# players list&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;values&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;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;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;Both Counters and Lists can have a &lt;code&gt;capacity&lt;/code&gt; value, which indicated the maximum counter value, or number of items that
can be stored in the list.&lt;/p&gt;
&lt;p&gt;In the above example, the &lt;code&gt;room&lt;/code&gt; Counter has a capacity of 10, which means that the count cannot go past that value.&lt;/p&gt;
&lt;p&gt;See the &lt;a href=&#34;/site/site/docs/reference/gameserver/&#34;&gt;GameServer&lt;/a&gt; reference for all configurable options.&lt;/p&gt;
&lt;h2 id=&#34;retrieval&#34;&gt;Retrieval&lt;/h2&gt;
&lt;p&gt;We now have several ways to retrieve this Counter and List information from a GameServer, depending on your use case.&lt;/p&gt;
&lt;h3 id=&#34;kubernetes-api&#34;&gt;Kubernetes API&lt;/h3&gt;
&lt;p&gt;If you wish to retrieve or view current Counter or List values from outside your &lt;code&gt;GameServer&lt;/code&gt;, you are able to do this
through the Kubernetes API, or similarly through &lt;code&gt;kubectl&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Counter values and capacities for are stored on a &lt;code&gt;GameServer&lt;/code&gt; resource instance
under &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Counters&lt;/code&gt;&lt;/a&gt; by key, and &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Lists&lt;/code&gt;&lt;/a&gt; stores
List value arrays and capacities by key as well.&lt;/p&gt;
&lt;p&gt;Therefore, in the above examples, the &lt;code&gt;GameServer.Status.Counters[rooms].Count&lt;/code&gt;
and &lt;code&gt;GameServer.Status.Counters[rooms].Capacity&lt;/code&gt; would have the current Counter value and capacity for the room
counters.&lt;/p&gt;
&lt;p&gt;Subsequently &lt;code&gt;GameServer.Status.Lists[players].Values&lt;/code&gt; stores the array of values for the list
and &lt;code&gt;GameServer.Status.Lists[players].Capacity&lt;/code&gt; is the current capacity for the player tracking List.&lt;/p&gt;
&lt;p&gt;Check the API reference for &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServerStatus&lt;/code&gt;&lt;/a&gt; for all the details on the data structure.&lt;/p&gt;
&lt;h3 id=&#34;sdk&#34;&gt;SDK&lt;/h3&gt;
&lt;p&gt;Counter and Lists values can be accessed through the Agones SDK when that information is required within your game
server process.&lt;/p&gt;
&lt;p&gt;For example, to retrieve the above &lt;code&gt;room&lt;/code&gt; counter, each language SDK has some implementation of the
&lt;a href=&#34;/site/site/docs/guides/client-sdks/#alphagetcountercountkey&#34;&gt;&lt;code&gt;SDK.Alpha().GetCounterCount(&amp;quot;room&amp;quot;)&lt;/code&gt;&lt;/a&gt;
function
that returns
the current value of the counter. Similarly, to retrieve the &lt;code&gt;players&lt;/code&gt; list, we can use the
&lt;a href=&#34;/site/site/docs/guides/client-sdks/#alphagetlistvalueskey&#34;&gt;&lt;code&gt;SDK.Alpha().GetListValues(&amp;quot;players&amp;quot;)&lt;/code&gt;&lt;/a&gt;
function.&lt;/p&gt;
&lt;p&gt;The special ability of the SDK retrieval operations, is that is also tracks any modifications that have been made
through the SDK, that have yet to be persisted to the &lt;code&gt;GameServer&lt;/code&gt;, and will return values with that data included.&lt;/p&gt;
&lt;p&gt;This means that any modifications made to Counters and Lists sent through the SDK can be immediately and atomically
retrieved from the SDK from the game server binary with accurate information without having to wait for it be persisted
to the &lt;code&gt;GameServer&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;See the &lt;a href=&#34;/site/site/docs/guides/client-sdks/&#34;&gt;SDK Guide&lt;/a&gt; for the full set of data retrieval functions
that are available.&lt;/p&gt;
&lt;h2 id=&#34;manipulation&#34;&gt;Manipulation&lt;/h2&gt;
&lt;p&gt;We also have several ways to manipulate the Counter and List information stored on a &lt;code&gt;GameServer&lt;/code&gt; instance, depending on your use case.&lt;/p&gt;
&lt;h3 id=&#34;sdk-1&#34;&gt;SDK&lt;/h3&gt;
&lt;p&gt;Counter and Lists values can be modified through the Agones SDK when you wish to be able to edit that information
within your game server process.&lt;/p&gt;
&lt;p&gt;For example, to increment the above &lt;code&gt;room&lt;/code&gt; counter by 1, each language SDK has some implementation of the
&lt;a href=&#34;/site/site/docs/guides/client-sdks/#alphaincrementcounterkey-amount&#34;&gt;&lt;code&gt;SDK.Alpha().IncrementCounter(&amp;quot;room&amp;quot;, 1)&lt;/code&gt;&lt;/a&gt;
function thatincrements the counter by 1. Similarly, to add the value &lt;code&gt;player1&lt;/code&gt; to the &lt;code&gt;players&lt;/code&gt; list, we can use the
&lt;a href=&#34;/site/site/docs/guides/client-sdks/#alphaappendlistvaluekey-value&#34;&gt;&lt;code&gt;SDK.Alpha().AppendListValue(&amp;quot;players&amp;quot;, &amp;quot;player1&amp;quot;)&lt;/code&gt;&lt;/a&gt;
function.&lt;/p&gt;
&lt;p&gt;See the &lt;a href=&#34;/site/site/docs/guides/client-sdks/&#34;&gt;SDK Guide&lt;/a&gt; for the full set of modification functions
that are available.&lt;/p&gt;
&lt;h3 id=&#34;allocation&#34;&gt;Allocation&lt;/h3&gt;
&lt;p&gt;When performing a &lt;code&gt;GameServer&lt;/code&gt; allocation, you may want to manipulate the Counter and/or List information atomically
on a &lt;code&gt;GameServer&lt;/code&gt; allocation operation.&lt;/p&gt;
&lt;p&gt;For example, you may wish to increment the &lt;code&gt;room&lt;/code&gt; counter to indicate a new game session has started on the returned
&lt;code&gt;GameServer&lt;/code&gt; instance, or provide the connecting player information to the &lt;code&gt;player&lt;/code&gt; list to make that available to
the game server binary before the player connects.&lt;/p&gt;
&lt;p&gt;This can be done through &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#allocation.agones.dev/v1.GameServerAllocationSpec&#34;&gt;&lt;code&gt;GameServerAllocation.Spec.Counters&lt;/code&gt;&lt;/a&gt; and
&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#allocation.agones.dev/v1.GameServerAllocationSpec&#34;&gt;&lt;code&gt;GameServerAllocation.Spec.Lists&lt;/code&gt;&lt;/a&gt;, which provide
&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#allocation.agones.dev/v1.CounterAction&#34;&gt;&lt;code&gt;CounterAction&lt;/code&gt;&lt;/a&gt; and
&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#allocation.agones.dev/v1.ListAction&#34;&gt;&lt;code&gt;ListAction&lt;/code&gt;&lt;/a&gt;
configuration respectively.&lt;/p&gt;
&lt;p&gt;For example, if on allocation we wished to increment the &lt;code&gt;room&lt;/code&gt; counter by 1 and add &lt;code&gt;player1&lt;/code&gt; to the &lt;code&gt;players&lt;/code&gt; list,
this could be done with the following &lt;code&gt;GameServerAllocation&lt;/code&gt; specification:&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:#000&#34;&gt;allocation.agones.dev/v1&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;GameServerAllocation&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;selectors&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;matchLabels&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;agones.dev/fleet&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;counters&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;rooms&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;action&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;Increment&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;amount&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;1&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;lists&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;players&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;addValues&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&#34;&gt;player1&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;Counter and List changes made through the &lt;code&gt;GameServerAllocation&lt;/code&gt; functionality, will be eventually consistent in
their availability via the &lt;a href=&#34;#sdk&#34;&gt;SDK retrieval functions&lt;/a&gt; for performance reasons.&lt;/p&gt;
&lt;p&gt;Performing these data changes as part of the Allocation also &lt;strong&gt;does not&lt;/strong&gt; guarantee that the
counter or list is past its capacity value. In the event that the capacity is exceeded, the allocation will succeed, but
the Counter or List values will not be updated. If you want to ensure there is capacity available for the Allocation
operation, see &lt;a href=&#34;#allocation-filtering-and-prioritisation&#34;&gt;Allocation Filtering and Prioritisation&lt;/a&gt; below.&lt;/p&gt;
&lt;p&gt;See the &lt;a href=&#34;/site/site/docs/reference/gameserverallocation/&#34;&gt;Allocation Reference&lt;/a&gt; for all the Allocation
configuration options.&lt;/p&gt;
&lt;h3 id=&#34;kubernetes-api-1&#34;&gt;Kubernetes API&lt;/h3&gt;
&lt;p&gt;Counter values and capacities are stored on a &lt;code&gt;GameServer&lt;/code&gt; resource instance
under &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Counters&lt;/code&gt;&lt;/a&gt; by key, and &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Lists&lt;/code&gt;&lt;/a&gt; stores
List value arrays and capacities by key as well. Therefore, they can be modified through the Kubernetes API either
through &lt;a href=&#34;https://kubernetes.io/docs/reference/using-api/client-libraries/&#34;&gt;Kubernetes client libraries&lt;/a&gt; or manually
through &lt;code&gt;kubectl edit&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Counter and List changes made through the &lt;code&gt;GameServerAllocation&lt;/code&gt; functionality, will be eventually consistent in
their availability via the &lt;a href=&#34;#sdk&#34;&gt;SDK retrieval functions&lt;/a&gt; for performance reasons.&lt;/p&gt;
&lt;p&gt;Check out the &lt;a href=&#34;/site/site/docs/guides/access-api/&#34;&gt;Access Agones via the Kubernetes API&lt;/a&gt; guide for a more in depth guide
on how to interact with Agones resources through the Kubernetes API programmatically.&lt;/p&gt;
&lt;h2 id=&#34;allocation-filtering-and-prioritisation&#34;&gt;Allocation Filtering and Prioritisation&lt;/h2&gt;
&lt;p&gt;Counters and Lists can also be used as filtering properties when performing an allocation through either the
&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#allocation.agones.dev/v1.GameServerAllocationSpec&#34;&gt;GameServerAllocation.Spec.Selectors.Counts&lt;/a&gt; or
&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#allocation.agones.dev/v1.GameServerAllocationSpec&#34;&gt;GameServerAllocation.Spec.Selectors.Lists&lt;/a&gt; properties.&lt;/p&gt;
&lt;p&gt;If we want to expand the above example to ensure there is always room for the &lt;code&gt;room&lt;/code&gt; Counter increment and room
for the &lt;code&gt;player&lt;/code&gt; List to add &lt;code&gt;player1&lt;/code&gt;, we can add the following to the &lt;code&gt;GameServerAllocation&lt;/code&gt; specification:&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:#000&#34;&gt;allocation.agones.dev/v1&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;GameServerAllocation&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;selectors&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;matchLabels&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;agones.dev/fleet&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;counters&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;rooms&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;minAvailable&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;1&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;lists&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;players&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;minAvailable&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;1&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;counters&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;rooms&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;action&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;Increment&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;amount&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;1&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;lists&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;players&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;addValues&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&#34;&gt;player1&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;Only &lt;code&gt;GameServer&lt;/code&gt; instances that have a &lt;code&gt;capacity&lt;/code&gt; value of at least one more than the Counter value, or List length
will be included in the potential allocation result - thereby ensuring that both &lt;code&gt;room&lt;/code&gt; and &lt;code&gt;player&lt;/code&gt; operations
will succeed, assuming a GameServer is found.&lt;/p&gt;
&lt;p&gt;This can be combined with the ability to define multiple &lt;code&gt;selectors&lt;/code&gt; to create quite sophisticated &lt;code&gt;GameServer&lt;/code&gt;
selection options that can attempt to find the most appropriate &lt;code&gt;GameServer&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;See the &lt;a href=&#34;/site/site/docs/reference/gameserverallocation/&#34;&gt;Allocation Reference&lt;/a&gt; for more details.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;priorities&lt;/code&gt; block also gives you options to prioritise specific &lt;code&gt;GameServers&lt;/code&gt; over others when performing an
Allocation, depending on the Allocation Strategy.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Packed: The &lt;a href=&#34;/site/site/docs/advanced/scheduling-and-autoscaling/#allocation-scheduling-strategy&#34;&gt;usual infrastructure optimisation strategy&lt;/a&gt;
still applies, but the &lt;code&gt;priorities&lt;/code&gt; block is used as a tie-breaker within the least utilised infrastructure, to ensure
optimal infrastructure usage while also allowing some custom prioritisation of &lt;code&gt;GameServers&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Distributed: The entire selection of &lt;code&gt;GameServers&lt;/code&gt; will be sorted by this priority list to provide the
order that &lt;code&gt;GameServers&lt;/code&gt; will be allocated by.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, if we wanted to select a &lt;code&gt;GameServer&lt;/code&gt; that had:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;At least one &lt;code&gt;room&lt;/code&gt; available in the GameServer capacity.&lt;/li&gt;
&lt;li&gt;First check Allocated &lt;code&gt;GameServers&lt;/code&gt; and falling back to &lt;code&gt;Ready&lt;/code&gt; &lt;code&gt;GameServers&lt;/code&gt; if there aren&amp;rsquo;t any.&lt;/li&gt;
&lt;li&gt;Include general infrastructure optimisation for least usage.&lt;/li&gt;
&lt;li&gt;And also ensure the &lt;code&gt;GameServers&lt;/code&gt; that were most full are allocated first (after infrastructure optimisations
where applied).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;We could implement the following &lt;code&gt;GameServerAllocation&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-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:#000&#34;&gt;allocation.agones.dev/v1&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;GameServerAllocation&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;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:#8f5902;font-style:italic&#34;&gt;# Choose most full `GameServers` first&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;priorities&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;type&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;Counter&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;key&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;rooms&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;order&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;Ascending&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;selectors&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:#8f5902;font-style:italic&#34;&gt;# First check to see if we can back-fill an already allocated `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;gameServerState&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;Allocated&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;matchLabels&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;agones.dev/fleet&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;counters&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;rooms&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;minAvailable&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;1&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:#8f5902;font-style:italic&#34;&gt;# If we can&amp;#39;t, then go get a `Ready` `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;gameServerState&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;Ready&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;matchLabels&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;agones.dev/fleet&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;counters&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;rooms&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;minAvailable&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;1&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;counters&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;rooms&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;action&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;Increment&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;amount&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;1&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;For more details on how Agones implements infrastructure optimisation, see the documentation on
&lt;a href=&#34;/site/site/docs/advanced/scheduling-and-autoscaling/&#34;&gt;Scheduling and Autoscaling&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;fleet-scale-down-prioritisation&#34;&gt;Fleet Scale Down Prioritisation&lt;/h2&gt;
&lt;p&gt;Another optimisation control you can apply with &lt;code&gt;Fleets&lt;/code&gt; when Agones&amp;rsquo; scaled them down, is to also set &lt;code&gt;priorities&lt;/code&gt;
to influence the order in which &lt;code&gt;GameServers&lt;/code&gt; are shutdown and deleted.&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;In versions 1.39.0 and lower, Fleet prioritisation is calculated using &lt;em&gt;total capacity&lt;/em&gt;, not &lt;em&gt;available capacity&lt;/em&gt;. This
is being updated in the 1.40.0 release such that this and all uses of &lt;code&gt;priorities&lt;/code&gt; operate using &lt;em&gt;available capacity&lt;/em&gt;,
and unless otherwise noted, will be the default behaviour in future releases.&lt;/p&gt;
&lt;p&gt;Therefore, in this rare case, the documentation on this functionality is forward-looking.&lt;/p&gt;


&lt;/div&gt;



&lt;p&gt;While neither &lt;code&gt;players&lt;/code&gt; or &lt;code&gt;rooms&lt;/code&gt; are particularly good examples for this functionality, if we wanted to ensure
that &lt;code&gt;Ready&lt;/code&gt; &lt;code&gt;GameServers&lt;/code&gt; with the most available capacity &lt;code&gt;rooms&lt;/code&gt; where a factor when scaling down a &lt;code&gt;Fleet&lt;/code&gt; we could
implement the following:&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:#000&#34;&gt;agones.dev/v1&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;2&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;priorities&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;type&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;Counter&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;key&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;rooms&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;order&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;Descending&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;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;counters&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;rooms&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:#8f5902;font-style:italic&#34;&gt;# room counter&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;count&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;0&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;capacity&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;10&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;Depending on the Fleet allocation strategy, the &lt;code&gt;priorities&lt;/code&gt; block will influence scale down logic as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Packed: The &lt;a href=&#34;/site/site/docs/advanced/scheduling-and-autoscaling/#fleet-scheduling&#34;&gt;usual infrastructure optimisation strategy&lt;/a&gt;
still applies, but the &lt;code&gt;priorities&lt;/code&gt; block is used as a tie-breaker within the least utilised infrastructure, to ensure
optimal infrastructure usage while also allowing some custom prioritisation of &lt;code&gt;GameServers&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Distributed: The entire selection of &lt;code&gt;GameServers&lt;/code&gt; will be sorted by this priority list to provide the
order that &lt;code&gt;GameServers&lt;/code&gt; will be scaled down by.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See &lt;a href=&#34;/site/site/docs/reference/fleet/&#34;&gt;Fleet Reference&lt;/a&gt; for all the configuration options.&lt;/p&gt;
&lt;h2 id=&#34;autoscaling&#34;&gt;Autoscaling&lt;/h2&gt;
&lt;p&gt;Counters and Lists expands on Fleet Autoscaling capabilities, by allowing you to autoscale based on available capacity
across the &lt;code&gt;Fleet&lt;/code&gt; as a unit, rather than the less granular unit of individual &lt;code&gt;GameServers&lt;/code&gt; instances.&lt;/p&gt;
&lt;p&gt;This means, we can implement an Autoscaling strategy of &amp;ldquo;always make sure there are 5 free &lt;code&gt;rooms&lt;/code&gt; available for new
players at all times&amp;rdquo; like so:&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:#000&#34;&gt;autoscaling.agones.dev/v1&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;FleetAutoscaler&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;fleetName&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-example&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;policy&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;type&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;Counter&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;counter&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;key&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;rooms&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;bufferSize&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;5&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;maxCapacity&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;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;See the &lt;a href=&#34;/site/site/docs/reference/fleetautoscaler/&#34;&gt;Fleet Autoscaling Reference&lt;/a&gt; for all the configuration
options.&lt;/p&gt;
&lt;h2 id=&#34;metrics&#34;&gt;Metrics&lt;/h2&gt;
&lt;p&gt;Metrics are exported, using the &lt;code&gt;key&lt;/code&gt; that the metric is stored under as a label on the metrics, in aggregate across
all &lt;code&gt;GameServers&lt;/code&gt; within a &lt;code&gt;Fleet&lt;/code&gt;, exporting aggregate numeric totals for Counters and Lists as gauge metrics.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;agones_fleet_counters&lt;/td&gt;
&lt;td&gt;Aggregate Metrics for Counters within a Fleet, including total capacity and count values&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_fleet_lists&lt;/td&gt;
&lt;td&gt;Aggregate Metrics for Lists within a Fleet, including total capacity and List lengths&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;See &lt;a href=&#34;/site/site/docs/guides/metrics/#metrics-available&#34;&gt;Metrics available&lt;/a&gt; for the full list of available metrics
and how to use them.&lt;/p&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;Next Steps&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Check out how to access &lt;a href=&#34;/site/site/docs/guides/access-api/&#34;&gt;Agones resource via the Kubernetes API&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Have a look at the external &lt;a href=&#34;/site/site/docs/advanced/allocator-service/&#34;&gt;Allocator Service&lt;/a&gt; to make integrating
Allocation into your workflow easier.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Player Tracking</title>
      <link>/site/docs/guides/player-tracking/</link>
      <pubDate>Tue, 19 May 2020 00:00:00 +0000</pubDate>
      
      <guid>/site/docs/guides/player-tracking/</guid>
      <description>
        
        
        

&lt;div class=&#34;pageinfo pageinfo-info&#34;&gt;
&lt;p&gt;&lt;a href=&#34;/site/site/docs/guides/counters-and-lists/&#34;&gt;Counters and Lists&lt;/a&gt; will eventually replace the Alpha functionality
of Player Tracking, which will subsequently be removed from Agones.&lt;/p&gt;
&lt;p&gt;If you are currently using this Alpha feature, we would love for you to test (and ideally migrate to!) this new
functionality to Counters and Lists to ensure it meet all your needs.&lt;/p&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;
    &lt;p&gt;The Player Tracking feature is currently &lt;strong&gt;&lt;a href=&#34;/site/site/docs/guides/feature-stages/#alpha&#34;&gt;Alpha&lt;/a&gt;&lt;/strong&gt;,
        not enabled by default, and may change in the future.&lt;/p&gt;
&lt;p&gt;Use the FeatureGate  &lt;code&gt;PlayerTracking&lt;/code&gt;
to enable and test this feature.&lt;/p&gt;
    &lt;p&gt;See the &lt;a href=&#34;/site/site/docs/guides/feature-stages/#feature-gates&#34;&gt;Feature Gate documentation&lt;/a&gt; for details on how to enable features.&lt;/p&gt;
&lt;/div&gt;

&lt;h2 id=&#34;managing-gameserver-capacities&#34;&gt;Managing GameServer Capacities&lt;/h2&gt;
&lt;p&gt;To track your &lt;code&gt;GameServer&lt;/code&gt; current player capacity, Agones gives you the ability to both set an initial capacity at
&lt;code&gt;GameServer&lt;/code&gt; creation, as well be able to change it during the lifecycle of the &lt;code&gt;GameServer&lt;/code&gt; through the Agones SDK.&lt;/p&gt;
&lt;p&gt;To set the initial capacity, you can do so via &lt;code&gt;GameServer.Spec.Players.InitialCapacity&lt;/code&gt; like so:&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;gs-example&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:#8f5902;font-style:italic&#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;players&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:#8f5902;font-style:italic&#34;&gt;# set this GameServer&amp;#39;s initial player capacity to 10&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;initialCapacity&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;10&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;From there, if you need to change the capacity of the GameSever as gameplay is in progress, you can also do so via
&lt;a href=&#34;/site/site/docs/guides/client-sdks/#alphasetplayercapacitycount&#34;&gt;&lt;code&gt;SDK.Alpha().SetPlayerCapacity(count)&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The current player capacity is represented in &lt;code&gt;GameServer.Status.Players.Capacity&lt;/code&gt; resource value.&lt;/p&gt;
&lt;p&gt;We can see this in action, when we look at the Status section of a GameServer resource
, wherein the capacity has been set to 20:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;...
Status:
  Address:    14.81.195.72
  Node Name:  gke-test-cluster-default-6cd0ba67-1mps
  Players:
    Capacity:  20
    Count:     0
    Ids:       &amp;lt;nil&amp;gt;
  Ports:
    Name:          gameport
    Port:          7983
  Reserved Until:  &amp;lt;nil&amp;gt;
  State:           Ready
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;From the SDK, the game server binary can also retrieve the current player capacity
via &lt;a href=&#34;/site/site/docs/guides/client-sdks/#alphagetplayercapacity&#34;&gt;&lt;code&gt;SDK.Alpha().GetPlayerCapacity()&lt;/code&gt;&lt;/a&gt;.&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;Changing the capacity value here has no impact on players actually
connected to or trying to connect to your server, as that is not a responsibility of Agones.&lt;/p&gt;
&lt;p&gt;This functionality is for tracking purposes only.&lt;/p&gt;


&lt;/div&gt;

&lt;h2 id=&#34;connecting-and-disconnecting-players&#34;&gt;Connecting and Disconnecting Players&lt;/h2&gt;
&lt;p&gt;As players connect and disconnect from your game, the Player Tracking functions enable you to track which players
are currently connected.&lt;/p&gt;
&lt;p&gt;It assumed that each player that connects has a unique token that identifies them as a player.&lt;/p&gt;
&lt;p&gt;When a player connects to the game server binary,
calling &lt;a href=&#34;/site/site/docs/guides/client-sdks/#alphaplayerconnectplayerid&#34;&gt;&lt;code&gt;SDK.Alpha().PlayerConnect(playerID)&lt;/code&gt;&lt;/a&gt;
with the unique player token will register them as connected, and store their player id.&lt;/p&gt;
&lt;p&gt;At disconnection time,
call &lt;a href=&#34;/site/site/docs/guides/client-sdks/#alphaplayerdisconnectplayerid&#34;&gt;&lt;code&gt;SDK.Alpha().PlayerDisconnect(playerID)&lt;/code&gt;&lt;/a&gt;
, which will deregister them and remove their player id from the list.&lt;/p&gt;
&lt;p&gt;Each of these &lt;code&gt;playerIDs&lt;/code&gt; is stored on &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt;, and the current count of connected players
can be seen in &lt;code&gt;GameServer.Status.Players.Count&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can see this in action below in the &lt;code&gt;GameServer&lt;/code&gt; Status section, where there are 4 players connected:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;...
Status:
  Address:    39.82.196.74
  Node Name:  gke-test-cluster-default-6cd0ba77-1mps
  Players:
    Capacity:  10
    Count:     4
    Ids:
      xy8a
      m0ux
      71nj
      lpq5
  Ports:
    Name:          gameport
    Port:          7166
  Reserved Until:  &amp;lt;nil&amp;gt;
  State:           Ready
&lt;/code&gt;&lt;/pre&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;Calling &lt;code&gt;PlayerConnect&lt;/code&gt; or &lt;code&gt;PlayerDisconnect&lt;/code&gt; functions will not
connect or disconnect players, as that is not under the control of Agones.&lt;/p&gt;
&lt;p&gt;This functionality is for tracking purposes only.&lt;/p&gt;


&lt;/div&gt;

&lt;h2 id=&#34;checking-player-data&#34;&gt;Checking Player Data&lt;/h2&gt;
&lt;p&gt;Not only is the connected player data stored on the &lt;code&gt;GameServer&lt;/code&gt; resource, it is also stored in memory within the
SDK, so that it can be used from within the game server binary as a realtime, thread safe, registry of connected
players.&lt;/p&gt;
&lt;p&gt;Therefore, if you want to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Get the current player count, call &lt;a href=&#34;/site/site/docs/guides/client-sdks/#alphagetplayercount&#34;&gt;&lt;code&gt;SDK.Alpha().GetPlayerCount()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Check if a specific player is connected, call &lt;a href=&#34;/site/site/docs/guides/client-sdks/#alphaisplayerconnectedplayerid&#34;&gt;&lt;code&gt;SDK.Alpha().IsPlayerConnected(playerID)&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Retrieve the full list of connected players, call &lt;a href=&#34;/site/site/docs/guides/client-sdks/#alphagetconnectedplayers&#34;&gt;&lt;code&gt;SDK.Alpha().GetConnectedPlayers()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;Next Steps&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Review the &lt;a href=&#34;/site/site/docs/guides/client-sdks/#player-tracking&#34;&gt;Player Tracking SDK Reference&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Local Game Server</title>
      <link>/site/docs/guides/local-game-server/</link>
      <pubDate>Tue, 19 Feb 2019 08:00:00 +0000</pubDate>
      
      <guid>/site/docs/guides/local-game-server/</guid>
      <description>
        
        
        &lt;p&gt;You can register a local game server with Agones. This means you can run an experimental build of your game server in the Agones environment without the need of packaging and deploying it to a fleet. This allows you to quickly iterate on your game server code while still being able to plugin to your Agones environment.&lt;/p&gt;
&lt;h2 id=&#34;register-your-server-with-agones&#34;&gt;Register your server with Agones&lt;/h2&gt;
&lt;p&gt;To register your local game server you&amp;rsquo;ll need to know the IP address of the machine running it and the port. With that you&amp;rsquo;ll create a game server config like the one below.&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:#000&#34;&gt;my-local-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;annotations&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:#8f5902;font-style:italic&#34;&gt;# Causes Agones to register your local game server at 192.1.1.2, replace with your server&amp;#39;s IP address.&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;agones.dev/dev-address&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;192.1.1.2&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;portPolicy&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;Static&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;hostPort&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;17654&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;17654&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:#8f5902;font-style:italic&#34;&gt;# The following is ignored but required due to validation.&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;Once you save this to a file make sure you have &lt;code&gt;kubectl&lt;/code&gt; configured to point to your Agones cluster and then run &lt;code&gt;kubectl apply -f dev-gameserver.yaml&lt;/code&gt;. This will register your server with Agones.&lt;/p&gt;
&lt;p&gt;Local Game Servers has a few limitations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PortPolicy must be &lt;code&gt;Static&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The game server is not managed by Agones. Features like autoscaling, replication, etc are not available.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When you are finished working with your server, you can remove the registration with &lt;code&gt;kubectl delete -f dev-gameserver.yaml&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;Next Steps:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Review the specification of &lt;a href=&#34;/site/site/docs/reference/gameserver/&#34;&gt;GameServer&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Read about &lt;code&gt;GameServer&lt;/code&gt; allocation.
&lt;ul&gt;
&lt;li&gt;Review the flow of how &lt;a href=&#34;/site/site/docs/integration-patterns/allocation-from-fleet/&#34;&gt;allocation&lt;/a&gt; is done.&lt;/li&gt;
&lt;li&gt;Review the specification of &lt;a href=&#34;/site/site/docs/reference/gameserverallocation/&#34;&gt;GameServerAllocation&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Check out the &lt;a href=&#34;/site/site/docs/advanced/allocator-service/&#34;&gt;Allocator Service&lt;/a&gt; as a richer alternative to &lt;code&gt;GameServerAllocation&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Learn how to connect your local development game server binary into a running Agones Kubernetes cluster for even more live development options with an &lt;a href=&#34;/site/site/docs/advanced/out-of-cluster-dev-server/&#34;&gt;out of cluster dev server&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Latency Testing with Multiple Clusters</title>
      <link>/site/docs/guides/ping-service/</link>
      <pubDate>Thu, 03 Jan 2019 01:20:30 +0000</pubDate>
      
      <guid>/site/docs/guides/ping-service/</guid>
      <description>
        
        
        &lt;p&gt;To make latency testing easier, Agones installs with a simple ping service with both HTTP and UDP services that can be called
for the purpose of timing how long the roundtrip takes for information to be returned from either of these services.&lt;/p&gt;
&lt;h2 id=&#34;installing&#34;&gt;Installing&lt;/h2&gt;
&lt;p&gt;By default, Agones installs &lt;a href=&#34;https://kubernetes.io/docs/concepts/services-networking/service/&#34;&gt;Kubernetes Services&lt;/a&gt; for
both HTTP and the UDP ping endpoints. These can be disabled entirely,
or disabled individually. See the &lt;a href=&#34;/site/site/docs/installation/install-agones/helm/&#34;&gt;Helm install guide&lt;/a&gt; for the parameters to
pass through,
as well as configuration options.&lt;/p&gt;
&lt;p&gt;The ping services as all installed under the &lt;code&gt;agones-system&lt;/code&gt; namespace.&lt;/p&gt;
&lt;h2 id=&#34;http-service&#34;&gt;HTTP Service&lt;/h2&gt;
&lt;p&gt;This exposes an endpoint that returns a simple text HTTP response on request to the root &amp;ldquo;/&amp;rdquo; path. By default this is &lt;code&gt;ok&lt;/code&gt;, but
it can be configured via the &lt;code&gt;agones.ping.http.response&lt;/code&gt; parameter.&lt;/p&gt;
&lt;p&gt;This could be useful for providing clusters
with unique lookup names, such that clients are able to identify clusters from their responses.&lt;/p&gt;
&lt;p&gt;To lookup the details of this service, run &lt;code&gt;kubectl describe service agones-ping-http-service --namespace=agones-system&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;udp-service&#34;&gt;UDP Service&lt;/h2&gt;
&lt;p&gt;The UDP ping service is a rate limited UDP echo service that returns the udp packet that it receives to its designated
sender.&lt;/p&gt;
&lt;p&gt;Since UDP sender details can be spoofed, this service is rate limited to 20 requests per second,
per sender address, per running instance (default is 2).&lt;/p&gt;
&lt;p&gt;This rate limit can be raised or lowered via the Helm install parameter &lt;code&gt;agones.ping.udp.rateLimit&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;UDP packets are also limited to 1024 bytes in size.&lt;/p&gt;
&lt;p&gt;To lookup the details of this service, run &lt;code&gt;kubectl describe service agones-ping-udp-service --namespace=agones-system&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;client-side-tooling&#34;&gt;Client side tooling&lt;/h2&gt;
&lt;p&gt;We deliberately didn&amp;rsquo;t provide any game client libraries, as all major languages and engines have capabilities
to send HTTP requests as well as UDP packets.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Metrics</title>
      <link>/site/docs/guides/metrics/</link>
      <pubDate>Thu, 03 Jan 2019 03:58:19 +0000</pubDate>
      
      <guid>/site/docs/guides/metrics/</guid>
      <description>
        
        
        &lt;p&gt;Agones controller exposes metrics via &lt;a href=&#34;https://opencensus.io/&#34;&gt;OpenCensus&lt;/a&gt;. OpenCensus is a single distribution of libraries that collect metrics and distributed traces from your services, we only use it for metrics but it will allow us to support multiple exporters in the future.&lt;/p&gt;
&lt;p&gt;We choose to start with &lt;a href=&#34;https://prometheus.io/&#34;&gt;Prometheus&lt;/a&gt; as this is the most popular with Kubernetes but it is also compatible with Cloud Monitoring.
If you need another exporter, check the &lt;a href=&#34;https://opencensus.io/exporters/supported-exporters/go/&#34;&gt;list of supported&lt;/a&gt; exporters. It should be pretty straightforward to register a new one. (GitHub PRs are more than welcome.)&lt;/p&gt;
&lt;p&gt;We plan to support multiple exporters in the future via environment variables and helm flags.&lt;/p&gt;
&lt;h2 id=&#34;backend-integrations&#34;&gt;Backend integrations&lt;/h2&gt;
&lt;h3 id=&#34;prometheus&#34;&gt;Prometheus&lt;/h3&gt;
&lt;p&gt;If you are running a &lt;a href=&#34;https://prometheus.io/&#34;&gt;Prometheus&lt;/a&gt; instance you just need to ensure that metrics and kubernetes service discovery are enabled. (helm chart values &lt;code&gt;agones.metrics.prometheusEnabled&lt;/code&gt; and &lt;code&gt;agones.metrics.prometheusServiceDiscovery&lt;/code&gt;). This will automatically add annotations required by Prometheus to discover Agones metrics and start collecting them. (see &lt;a href=&#34;https://github.com/prometheus/prometheus/tree/main/documentation/examples/kubernetes-rabbitmq&#34;&gt;example&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;If your Prometheus metrics collection agent requires that you scrape from the pods directly(such as with &lt;a href=&#34;https://cloud.google.com/stackdriver/docs/managed-prometheus&#34;&gt;Google Cloud Managed Prometheus&lt;/a&gt;), then the metrics ports for the controller and allocator will both be named &lt;code&gt;http&lt;/code&gt; and exposed on &lt;code&gt;8080&lt;/code&gt;. In the case of the allocator, the port name and number can be overriden with the &lt;code&gt;agones.allocator.serviceMetrics.http.portName&lt;/code&gt; and &lt;code&gt;agones.allocator.serviceMetrics.http.port&lt;/code&gt; helm chart values.&lt;/p&gt;
&lt;h3 id=&#34;prometheus-operator&#34;&gt;Prometheus Operator&lt;/h3&gt;
&lt;p&gt;If you have &lt;a href=&#34;https://github.com/coreos/prometheus-operator&#34;&gt;Prometheus operator&lt;/a&gt; installed in your cluster, just enable ServiceMonitor installation in values:&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;agones&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;metrics&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;serviceMonitor&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;enabled&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:#204a87;font-weight:bold&#34;&gt;true&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;h3 id=&#34;google-cloud-managed-service-for-prometheus&#34;&gt;Google Cloud Managed Service for Prometheus&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://cloud.google.com/stackdriver/docs/managed-prometheus&#34;&gt;Google Cloud Managed Service for Prometheus&lt;/a&gt; is a fully managed multi-cloud solution for &lt;a href=&#34;https://prometheus.io/&#34;&gt;Prometheus&lt;/a&gt;.
If you wish to use Managed Prometheus with Agones, follow the &lt;a href=&#34;#google-cloud-managed-service-for-prometheus-installation&#34;&gt;Google Cloud Managed Service for Prometheus installation steps&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;google-cloud-monitoring-formerly-stackdriver&#34;&gt;Google Cloud Monitoring (formerly Stackdriver)&lt;/h3&gt;
&lt;p&gt;We support the &lt;a href=&#34;https://opencensus.io/exporters/supported-exporters/go/stackdriver/&#34;&gt;OpenCensus Stackdriver exporter&lt;/a&gt;.
In order to use it you should enable &lt;a href=&#34;https://cloud.google.com/monitoring/api/enable-api&#34;&gt;Cloud Monitoring API&lt;/a&gt; in Google Cloud Console.
Follow the &lt;a href=&#34;#google-cloud-monitoring-installation&#34;&gt;Google Cloud Monitoring installation steps&lt;/a&gt; to see your metrics in Cloud Monitoring.&lt;/p&gt;
&lt;h2 id=&#34;metrics-available&#34;&gt;Metrics available&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;agones_gameservers_count&lt;/td&gt;
&lt;td&gt;The number of gameservers per fleet and status&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_gameserver_allocations_duration_seconds&lt;/td&gt;
&lt;td&gt;The distribution of gameserver allocation requests latencies&lt;/td&gt;
&lt;td&gt;histogram&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_gameservers_total&lt;/td&gt;
&lt;td&gt;The total of gameservers per fleet and status&lt;/td&gt;
&lt;td&gt;counter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_gameserver_player_connected_total&lt;/td&gt;
&lt;td&gt;The total number of players connected to gameservers (Only available when &lt;a href=&#34;/site/site/docs/guides/player-tracking/&#34;&gt;player tracking&lt;/a&gt; is enabled)&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_gameserver_player_capacity_total&lt;/td&gt;
&lt;td&gt;The available capacity for players on gameservers (Only available when &lt;a href=&#34;/site/site/docs/guides/player-tracking/&#34;&gt;player tracking&lt;/a&gt; is enabled)&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_fleets_replicas_count&lt;/td&gt;
&lt;td&gt;The number of replicas per fleet (total, desired, ready, reserved, allocated)&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_fleet_counters&lt;/td&gt;
&lt;td&gt;Aggregate Metrics for Counters within a Fleet, including total capacity and count values (Only available when &lt;a href=&#34;/site/site/docs/guides/counters-and-lists/&#34;&gt;Counters and Lists&lt;/a&gt;) are enabled)&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_fleet_lists&lt;/td&gt;
&lt;td&gt;Aggregate Metrics for Lists within a Fleet, including total capacity and List lengths (Only available when &lt;a href=&#34;/site/site/docs/guides/counters-and-lists/&#34;&gt;Counters and Lists&lt;/a&gt;) are enabled)&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_fleet_autoscalers_able_to_scale&lt;/td&gt;
&lt;td&gt;The fleet autoscaler can access the fleet to scale&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_fleet_autoscalers_buffer_limits&lt;/td&gt;
&lt;td&gt;The limits of buffer based fleet autoscalers (min, max)&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_fleet_autoscalers_buffer_size&lt;/td&gt;
&lt;td&gt;The buffer size of fleet autoscalers (count or percentage)&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_fleet_autoscalers_current_replicas_count&lt;/td&gt;
&lt;td&gt;The current replicas count as seen by autoscalers&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_fleet_autoscalers_desired_replicas_count&lt;/td&gt;
&lt;td&gt;The desired replicas count as seen by autoscalers&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_fleet_autoscalers_limited&lt;/td&gt;
&lt;td&gt;The fleet autoscaler is outside the limits set by MinReplicas and MaxReplicas.&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_gameservers_node_count&lt;/td&gt;
&lt;td&gt;The distribution of gameservers per node&lt;/td&gt;
&lt;td&gt;histogram&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_nodes_count&lt;/td&gt;
&lt;td&gt;The count of nodes empty and with gameservers&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_gameservers_state_duration&lt;/td&gt;
&lt;td&gt;The distribution of gameserver state duration in seconds. Note: this metric could have some missing samples by design. Do not use the &lt;code&gt;_total&lt;/code&gt; counter as the real value for state changes.&lt;/td&gt;
&lt;td&gt;histogram&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_k8s_client_http_request_total&lt;/td&gt;
&lt;td&gt;The total of HTTP requests to the Kubernetes API by status code&lt;/td&gt;
&lt;td&gt;counter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_k8s_client_http_request_duration_seconds&lt;/td&gt;
&lt;td&gt;The distribution of HTTP requests latencies to the Kubernetes API by status code&lt;/td&gt;
&lt;td&gt;histogram&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_k8s_client_cache_list_total&lt;/td&gt;
&lt;td&gt;The total number of list operations for client-go caches&lt;/td&gt;
&lt;td&gt;counter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_k8s_client_cache_list_duration_seconds&lt;/td&gt;
&lt;td&gt;Duration of a Kubernetes list API call in seconds&lt;/td&gt;
&lt;td&gt;histogram&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_k8s_client_cache_list_items&lt;/td&gt;
&lt;td&gt;Count of items in a list from the Kubernetes API&lt;/td&gt;
&lt;td&gt;histogram&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_k8s_client_cache_watches_total&lt;/td&gt;
&lt;td&gt;The total number of watch operations for client-go caches&lt;/td&gt;
&lt;td&gt;counter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_k8s_client_cache_last_resource_version&lt;/td&gt;
&lt;td&gt;Last resource version from the Kubernetes API&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_k8s_client_workqueue_depth&lt;/td&gt;
&lt;td&gt;Current depth of the work queue&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_k8s_client_workqueue_latency_seconds&lt;/td&gt;
&lt;td&gt;How long an item stays in the work queue&lt;/td&gt;
&lt;td&gt;histogram&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_k8s_client_workqueue_items_total&lt;/td&gt;
&lt;td&gt;Total number of items added to the work queue&lt;/td&gt;
&lt;td&gt;counter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_k8s_client_workqueue_work_duration_seconds&lt;/td&gt;
&lt;td&gt;How long processing an item from the work queue takes&lt;/td&gt;
&lt;td&gt;histogram&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_k8s_client_workqueue_retries_total&lt;/td&gt;
&lt;td&gt;Total number of items retried to the work queue&lt;/td&gt;
&lt;td&gt;counter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_k8s_client_workqueue_longest_running_processor&lt;/td&gt;
&lt;td&gt;How long the longest running workqueue processor has been running in microseconds&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;agones_k8s_client_workqueue_unfinished_work_seconds&lt;/td&gt;
&lt;td&gt;How long unfinished work has been sitting in the workqueue in seconds&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id=&#34;dropping-metric-labels&#34;&gt;Dropping Metric Labels&lt;/h3&gt;
&lt;p&gt;When a Fleet or FleetAutoscaler is deleted from the system, Agones will automatically clear metrics that utilise
their name as a label from the exported metrics, so the metrics exported do not continuously grow in size over the
lifecycle of the Agones installation.&lt;/p&gt;
&lt;h2 id=&#34;dashboard&#34;&gt;Dashboard&lt;/h2&gt;
&lt;h3 id=&#34;grafana-dashboards&#34;&gt;Grafana Dashboards&lt;/h3&gt;
&lt;p&gt;We provide a set of useful &lt;a href=&#34;https://grafana.com/&#34;&gt;Grafana&lt;/a&gt; dashboards to monitor Agones workload, they are located under the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/main//build/grafana&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;grafana folder&lt;/a&gt;
:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/main//build/grafana/dashboard-autoscalers.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Autoscalers&lt;/a&gt;
 allows you to monitor your current autoscalers replicas request as well as fleet replicas allocation and readyness statuses. You can only select one autoscaler at the time using the provided dropdown.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/main//build/grafana/dashboard-gameservers.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones GameServers&lt;/a&gt;
 displays your current game servers workload status (allocations, game servers statuses, fleets replicas) with optional fleet name filtering.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/main//build/grafana/dashboard-allocations.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones GameServer Allocations&lt;/a&gt;
 displays Agones gameservers allocations rates and counts per fleet.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/main//build/grafana/dashboard-allocator-usage.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Allocator Resource&lt;/a&gt;
 displays Agones Allocators CPU, memory usage and also some useful Golang runtime metrics.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/main//build/grafana/dashboard-status.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Status&lt;/a&gt;
 displays Agones controller health status.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/main//build/grafana/dashboard-controller-usage.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Controller Resource Usage&lt;/a&gt;
 displays Agones Controller CPU and memory usage and also some Golang runtime metrics.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/main//build/grafana/dashboard-goclient-requests.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Controller go-client requests&lt;/a&gt;
 displays Agones Controller Kubernetes API consumption.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/main//build/grafana/dashboard-goclient-caches.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Controller go-client caches&lt;/a&gt;
 displays Agones Controller Kubernetes Watches/Lists operations used.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/main//build/grafana/dashboard-goclient-workqueues.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Controller go-client workqueues&lt;/a&gt;
 displays Agones Controller workqueue processing time and rates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/main//build/grafana/dashboard-apiserver-requests.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Controller API Server requests&lt;/a&gt;
 displays your current API server request rate, errors rate and request latencies with optional CustomResourceDefinition filtering by Types: fleets, gameserversets, gameservers, gameserverallocations.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Dashboard screenshots :&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../images/grafana-dashboard-autoscalers.png&#34; alt=&#34;grafana dashboard autoscalers&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../images/grafana-dashboard-controller.png&#34; alt=&#34;grafana dashboard controller&#34;&gt;&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;

    You can import our dashboards by copying the json content from
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/main//build/grafana&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;each config map&lt;/a&gt;
into your own instance of Grafana (+ &amp;gt; Create &amp;gt; Import &amp;gt; Or paste json) or follow the &lt;a href=&#34;#installation&#34;&gt;installation&lt;/a&gt; guide.

&lt;/div&gt;

&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;
&lt;p&gt;When operating a live multiplayer game you will need to observe performances, resource usage and availability to learn more about your system. This guide will explain how you can setup Prometheus and Grafana into your own Kubernetes cluster to monitor your Agones workload.&lt;/p&gt;
&lt;p&gt;Before attemping this guide you should make sure you have &lt;a href=&#34;https://kubernetes.io/docs/tasks/tools/install-kubectl/&#34;&gt;kubectl&lt;/a&gt; and &lt;a href=&#34;https://docs.helm.sh/using_helm/&#34;&gt;helm&lt;/a&gt; installed and configured to reach your kubernetes cluster.&lt;/p&gt;
&lt;h3 id=&#34;prometheus-installation&#34;&gt;Prometheus installation&lt;/h3&gt;
&lt;p&gt;Prometheus is an open source monitoring solution, we will use it to store Agones controller metrics and query back the data.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s install Prometheus using the &lt;a href=&#34;https://prometheus-community.github.io/helm-charts/&#34;&gt;Prometheus Community Kubernetes Helm Charts&lt;/a&gt; repository.&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;helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;helm repo update
&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;helm upgrade --install --wait prom prometheus-community/prometheus --namespace metrics --create-namespace &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 server.global.scrape_interval&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;30s &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 server.persistentVolume.enabled&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87&#34;&gt;true&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;    --set server.persistentVolume.size&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;64Gi &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;    -f ./build/prometheus.yaml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For resiliency it is recommended to run Prometheus on a dedicated node which is separate from nodes where Game Servers
are scheduled. If you use the above command, with our 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/main//build/prometheus.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;prometheus.yaml&lt;/a&gt;
 to set up Prometheus, it will schedule Prometheus pods on nodes
tainted with &lt;code&gt;agones.dev/agones-metrics=true:NoExecute&lt;/code&gt; and labeled with &lt;code&gt;agones.dev/agones-metrics=true&lt;/code&gt; if available.&lt;/p&gt;
&lt;p&gt;As an example, to set up a dedicated node pool for Prometheus on GKE, run the following command before installing Prometheus. Alternatively you can taint and label nodes manually.&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;gcloud container node-pools create agones-metrics --cluster&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;... --zone&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&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;  --node-taints agones.dev/agones-metrics&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;true:NoExecute &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;  --node-labels agones.dev/agones-metrics&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87&#34;&gt;true&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;  --num-nodes&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;1&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;  --machine-type&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;e2-standard-4
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;By default we will disable the push gateway (we don&amp;rsquo;t need it for Agones) and other exporters.&lt;/p&gt;
&lt;p&gt;The helm chart supports
&lt;a href=&#34;https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector&#34;&gt;nodeSelector&lt;/a&gt;,
&lt;a href=&#34;https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity&#34;&gt;affinity&lt;/a&gt; and &lt;a href=&#34;https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/&#34;&gt;toleration&lt;/a&gt;, you can use them to schedule Prometheus deployments on an isolated node(s) to have an homogeneous game servers workload.&lt;/p&gt;
&lt;p&gt;This will install a Prometheus Server in your current cluster with &lt;a href=&#34;https://kubernetes.io/docs/concepts/storage/persistent-volumes/&#34;&gt;Persistent Volume Claim&lt;/a&gt; (Deactivated for Minikube and Kind) for storing and querying time series, it will automatically start collecting metrics from Agones Controller.&lt;/p&gt;
&lt;p&gt;Finally, to access Prometheus metrics, rules and alerts explorer 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;kubectl port-forward deployments/prom-prometheus-server &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;9090&lt;/span&gt; -n metrics
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now you can access the prometheus dashboard &lt;a href=&#34;http://localhost:9090&#34;&gt;http://localhost:9090&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On the landing page you can start exploring metrics by creating &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/querying/basics/&#34;&gt;queries&lt;/a&gt;. You can also verify what &lt;a href=&#34;http://localhost:9090/targets&#34;&gt;targets&lt;/a&gt; Prometheus currently monitors (Header Status &amp;gt; Targets), you should see Agones controller pod in the &lt;code&gt;kubernetes-pods&lt;/code&gt; section.&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;

    Metrics will be first registered when you will start using Agones.

&lt;/div&gt;

&lt;p&gt;Now let&amp;rsquo;s install some Grafana dashboards.&lt;/p&gt;
&lt;h3 id=&#34;grafana-installation&#34;&gt;Grafana installation&lt;/h3&gt;
&lt;p&gt;Grafana is a open source time series analytics platform which supports Prometheus data source. We can also easily import pre-built dashboards.&lt;/p&gt;
&lt;p&gt;First we will install &lt;a href=&#34;#grafana-dashboards&#34;&gt;Agones dashboard&lt;/a&gt; as &lt;a href=&#34;https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/&#34;&gt;config maps&lt;/a&gt; in our 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;kubectl apply -f ./build/grafana/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now we can install the
&lt;a href=&#34;https://grafana.github.io/helm-charts/&#34;&gt;Grafana Community Kubernetes Helm Charts&lt;/a&gt; from
their repository. (Replace &lt;code&gt;&amp;lt;your-admin-password&amp;gt;&lt;/code&gt; with the admin password of your choice)&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;helm repo add grafana https://grafana.github.io/helm-charts
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;helm repo update
&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;helm upgrade --install --wait grafana grafana/grafana --namespace metrics &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 &lt;span style=&#34;color:#000&#34;&gt;adminPassword&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&amp;lt;your-admin-password&amp;gt; -f ./build/grafana.yaml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will install Grafana with our prepopulated dashboards and prometheus datasource &lt;a href=&#34;#prometheus-installation&#34;&gt;previously installed&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Finally to access dashboards run&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 port-forward deployments/grafana &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;3000&lt;/span&gt; -n metrics
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Open a web browser to &lt;a href=&#34;http://localhost:3000&#34;&gt;http://localhost:3000&lt;/a&gt;, you should see Agones &lt;a href=&#34;#grafana-dashboards&#34;&gt;dashboards&lt;/a&gt; after login as admin.&lt;/p&gt;
&lt;h3 id=&#34;google-cloud-managed-service-for-prometheus-installation&#34;&gt;Google Cloud Managed Service for Prometheus installation&lt;/h3&gt;
&lt;p&gt;To collect Agones metrics using &lt;a href=&#34;https://cloud.google.com/stackdriver/docs/managed-prometheus&#34;&gt;Managed Prometheus&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Follow the instructions to enable managed collection for a &lt;a href=&#34;https://cloud.google.com/stackdriver/docs/managed-prometheus/setup-managed#enable-mgdcoll-gke&#34;&gt;GKE cluster&lt;/a&gt; or &lt;a href=&#34;https://cloud.google.com/stackdriver/docs/managed-prometheus/setup-managed#enable-mgdcoll-non-gke&#34;&gt;non-GKE cluster&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure Managed Prometheus to scrape Agones by creating a &lt;code&gt;PodMonitoring&lt;/code&gt; resource:&lt;/p&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 apply -n agones-system -f https://raw.githubusercontent.com/googleforgames/agones/release-1.39.0/build/prometheus-google-managed.yaml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;Confirm that you can see &lt;a href=&#34;https://cloud.google.com/monitoring/promql&#34;&gt;Prometheus metrics in Cloud Monitoring&lt;/a&gt;. If that&amp;rsquo;s all you need, you can stop here.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To install Grafana using a Managed Prometheus backend:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Complete the &lt;a href=&#34;https://cloud.google.com/stackdriver/docs/managed-prometheus/query#begin&#34;&gt;Before you begin&lt;/a&gt;. To align with the Agones &lt;a href=&#34;#grafana-installation&#34;&gt;Grafana installation&lt;/a&gt;, we&amp;rsquo;ll be installing in the &lt;code&gt;metrics&lt;/code&gt; namespace, which you&amp;rsquo;ll need to create.
&lt;ul&gt;
&lt;li&gt;If your cluster has Workload Identity enabled, which is enabled on GKE Autopilot by default, follow &lt;a href=&#34;https://cloud.google.com/stackdriver/docs/managed-prometheus/query#gmp-wli-svcacct&#34;&gt;Configure a service account for Workload Identity&lt;/a&gt; to ensure that you have appropriately authorized the default Kubernetes service account in the &lt;code&gt;metrics&lt;/code&gt; namespace.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Install the &lt;a href=&#34;https://cloud.google.com/stackdriver/docs/managed-prometheus/query#ui-prometheus&#34;&gt;Standalone Prometheus frontend UI&lt;/a&gt; in the &lt;code&gt;metrics&lt;/code&gt; namespace - this will act as your authentication proxy for PromQL queries.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#grafana-installation&#34;&gt;Install Grafana as above&lt;/a&gt;, using &lt;code&gt;-f ./build/grafana-frontend.yaml&lt;/code&gt; instead of &lt;code&gt;-f ./build/grafana.yaml&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;google-cloud-monitoring-installation&#34;&gt;Google Cloud Monitoring installation&lt;/h3&gt;
&lt;p&gt;In order to use &lt;a href=&#34;https://console.cloud.google.com/monitoring&#34;&gt;Google Cloud Monitoring&lt;/a&gt; you must &lt;a href=&#34;https://cloud.google.com/monitoring/api/enable-api&#34;&gt;enable the Monitoring API&lt;/a&gt; in the Google Cloud Console. The Cloud Monitoring exporter uses a strategy called Application Default Credentials (ADC) to find your application&amp;rsquo;s credentials. Details can be found in &lt;a href=&#34;https://cloud.google.com/docs/authentication/production&#34;&gt;Setting Up Authentication for Server to Server Production Applications&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You need to grant all the necessary permissions to the users (see &lt;a href=&#34;https://cloud.google.com/monitoring/access-control&#34;&gt;Access Control Guide&lt;/a&gt;). The predefined role Monitoring Metric Writer contains those permissions. Use the following command to assign the role to your default service account.&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;gcloud projects add-iam-policy-binding &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;[&lt;/span&gt;PROJECT_ID&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;]&lt;/span&gt; --member serviceAccount:&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;[&lt;/span&gt;PROJECT_NUMBER&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;]&lt;/span&gt;-compute@developer.gserviceaccount.com --role roles/monitoring.metricWriter
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&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;

    Cloud Operations for GKE (including Cloud Monitoring) is enabled by default on GKE clusters, however you can follow this &lt;a href=&#34;https://cloud.google.com/stackdriver/docs/solutions/gke/installing#upgrade-instructions&#34;&gt;guide&lt;/a&gt; if it is currently disabled in your GKE cluster.

&lt;/div&gt;

&lt;p&gt;Before proceeding, ensure you have created a metrics node pool as mentioned in the Google Cloud &lt;a href=&#34;/site/site/docs/installation/creating-cluster/gke/&#34;&gt;installation guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The default metrics exporter installed with Agones is Prometheus. If you are using the &lt;a href=&#34;/site/site/docs/installation/install-agones/helm/&#34;&gt;Helm installation&lt;/a&gt;, you can install or upgrade Agones to use Cloud Monitoring, using the following chart parameters:&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;helm upgrade --install --wait --set agones.metrics.stackdriverEnabled&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87&#34;&gt;true&lt;/span&gt; --set agones.metrics.prometheusEnabled&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87&#34;&gt;false&lt;/span&gt; --set agones.metrics.prometheusServiceDiscovery&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87&#34;&gt;false&lt;/span&gt; my-release-name agones/agones --namespace&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;agones-system
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&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;

    If you are using the &lt;a href=&#34;/site/site/docs/installation/install-agones/yaml/&#34;&gt;YAML installation&lt;/a&gt;, follow the instructions on the page to change the above parameters by using helm to generate a custom YAML file locally.

&lt;/div&gt;

&lt;p&gt;With this configuration only the Cloud Monitoring exporter would be used instead of Prometheus exporter.&lt;/p&gt;
&lt;h4 id=&#34;using-cloud-monitoring-with-workload-identity&#34;&gt;Using Cloud Monitoring with Workload Identity&lt;/h4&gt;
&lt;p&gt;If you would like to enable Cloud Monitoring in conjunction with &lt;a href=&#34;https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity&#34;&gt;Workload Identity&lt;/a&gt;, there are a few extra steps you need to follow:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;When setting up the Google service account following the instructions for &lt;a href=&#34;https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity#authenticating_to&#34;&gt;Authenticating to Google Cloud&lt;/a&gt;, create two IAM policy bindings, one for &lt;code&gt;serviceAccount:PROJECT_ID.svc.id.goog[agones-system/agones-controller]&lt;/code&gt; and one for &lt;code&gt;serviceAccount:PROJECT_ID.svc.id.goog[agones-system/agones-allocator]&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pass parameters to helm when installing Agones to add annotations to the &lt;code&gt;agones-controller&lt;/code&gt; and &lt;code&gt;agones-allocator&lt;/code&gt; Kubernetes service accounts:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&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;helm install my-release --namespace agones-system --create-namespace agones/agones --set agones.metrics.stackdriverEnabled&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87&#34;&gt;true&lt;/span&gt; --set agones.metrics.prometheusEnabled&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87&#34;&gt;false&lt;/span&gt; --set agones.metrics.prometheusServiceDiscovery&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87&#34;&gt;false&lt;/span&gt; --set agones.serviceaccount.allocator.annotations.&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;iam\.gke\.io/gcp-service-account&amp;#34;&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;#34;GSA_NAME@PROJECT_ID\.iam\.gserviceaccount\.com&amp;#34;&lt;/span&gt; --set agones.serviceaccount.allocator.labels.&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;iam\.gke\.io/gcp-service-account&amp;#34;&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;#34;GSA_NAME@PROJECT_ID\.iam\.gserviceaccount\.com&amp;#34;&lt;/span&gt; --set agones.serviceaccount.controller.annotations.&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;iam\.gke\.io/gcp-service-account&amp;#34;&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;#34;GSA_NAME@PROJECT_ID\.iam\.gserviceaccount\.com&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To verify that metrics are being sent to Cloud Monitoring, create a Fleet or a Gameserver and look for the metrics to show up in the Cloud Monitoring dashboard. Navigate to the &lt;a href=&#34;https://console.cloud.google.com/monitoring/metrics-explorer&#34;&gt;Metrics explorer&lt;/a&gt; and search for metrics with the prefix &lt;code&gt;agones/&lt;/code&gt;. Select a metric and look for data to be plotted in the graph to the right.&lt;/p&gt;
&lt;p&gt;An example of a custom dashboard is:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../images/stackdriver-metrics-dashboard.png&#34; alt=&#34;cloud monitoring dashboard&#34;&gt;&lt;/p&gt;
&lt;p&gt;Currently there exists only manual way of configuring Cloud Monitoring Dashboard. So it is up to you to set an Alignment Period (minimal is 1 minute), GroupBy, Filter parameters and other graph settings.&lt;/p&gt;
&lt;h4 id=&#34;troubleshooting&#34;&gt;Troubleshooting&lt;/h4&gt;
&lt;p&gt;If you can&amp;rsquo;t see Agones metrics you should have a look at the controller logs for connection errors. Also ensure that your cluster has the necessary credentials to interact with Cloud Monitoring. You can configure &lt;code&gt;stackdriverProjectID&lt;/code&gt; manually, if the automatic discovery is not working.&lt;/p&gt;
&lt;p&gt;Permissions problem example from controller logs:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Failed to export to Stackdriver: rpc error: code = PermissionDenied desc = Permission monitoring.metricDescriptors.create denied (or the resource may not exist).
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you receive this error, ensure your service account has the role or corresponding permissions mentioned above.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Access Agones via the Kubernetes API</title>
      <link>/site/docs/guides/access-api/</link>
      <pubDate>Thu, 03 Jan 2019 01:20:41 +0000</pubDate>
      
      <guid>/site/docs/guides/access-api/</guid>
      <description>
        
        
        &lt;p&gt;Installing Agones creates several &lt;a href=&#34;https://kubernetes.io/docs/concepts/api-extension/custom-resources&#34;&gt;Custom Resource Definitions (CRD)&lt;/a&gt;,
which can be accessed and manipulated through the Kubernetes API.&lt;/p&gt;
&lt;p&gt;The detailed list of Agones CRDs with their parameters could be found here - &lt;a href=&#34;../../reference/agones_crd_api_reference/&#34;&gt;Agones CRD API Reference&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Kubernetes has multiple &lt;a href=&#34;https://kubernetes.io/docs/reference/using-api/client-libraries/&#34;&gt;client libraries&lt;/a&gt;, however,
at time of writing, only
the &lt;a href=&#34;https://github.com/kubernetes/client-go&#34;&gt;Go&lt;/a&gt; and
&lt;a href=&#34;https://github.com/kubernetes-client/python/&#34;&gt;Python&lt;/a&gt; clients are documented to support accessing CRDs.&lt;/p&gt;
&lt;p&gt;This can be found in the &lt;a href=&#34;https://kubernetes.io/docs/concepts/api-extension/custom-resources/#accessing-a-custom-resource&#34;&gt;Accessing a custom resource&lt;/a&gt;
section of the Kubernetes documentation.&lt;/p&gt;
&lt;p&gt;At this time, we recommend interacting with Agones through the Go client that has been generated in this repository,
but other methods may also work as well.&lt;/p&gt;
&lt;h2 id=&#34;go-client&#34;&gt;Go Client&lt;/h2&gt;
&lt;p&gt;Kubernetes Go Client tooling generates a Client for Agones that we can use to interact with the Agones
installation on our Kubernetes cluster.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://pkg.go.dev/agones.dev/agones/pkg/client/clientset/versioned&#34;&gt;Godoc for the Agones Client&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://pkg.go.dev/k8s.io/client-go/kubernetes&#34;&gt;Godoc for the standard Kubernetes Client&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;authentication&#34;&gt;Authentication&lt;/h3&gt;
&lt;p&gt;This client uses the same authentication mechanisms as the Kubernetes API.&lt;/p&gt;
&lt;p&gt;If you plan to run your code in the same cluster as the Agones install, have a look at the
&lt;a href=&#34;https://github.com/kubernetes/client-go/tree/master/examples/in-cluster-client-configuration&#34;&gt;in cluster configuration&lt;/a&gt;
example from the Kubernetes Client.&lt;/p&gt;
&lt;p&gt;If you plan to run your code outside the Kubernetes cluster as your Agones install,
look at the &lt;a href=&#34;https://github.com/kubernetes/client-go/tree/master/examples/out-of-cluster-client-configuration&#34;&gt;out of cluster configuration&lt;/a&gt;
example from the Kubernetes client.&lt;/p&gt;
&lt;h3 id=&#34;example&#34;&gt;Example&lt;/h3&gt;
&lt;p&gt;The following is an example of a in-cluster configuration, that creates a &lt;code&gt;Clientset&lt;/code&gt; for Agones
and then creates a &lt;code&gt;GameServer&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A full example code is available in the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/release-1.39.0/examples/crd-client/main.go&#34; target=&#34;_blank&#34; data-proofer-ignore&gt; example folder&lt;/a&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-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;package&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;main&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:#204a87;font-weight:bold&#34;&gt;import&lt;/span&gt; &lt;span style=&#34;color:#000;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:#4e9a06&#34;&gt;&amp;#34;fmt&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;&amp;#34;context&amp;#34;&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;agonesv1&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/agones/pkg/apis/agones/v1&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;&amp;#34;agones.dev/agones/pkg/client/clientset/versioned&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;&amp;#34;agones.dev/agones/pkg/util/runtime&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:#000&#34;&gt;corev1&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;k8s.io/api/core/v1&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:#000&#34;&gt;metav1&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;k8s.io/apimachinery/pkg/apis/meta/v1&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;&amp;#34;k8s.io/client-go/kubernetes&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;&amp;#34;k8s.io/client-go/rest&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:#000;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:#204a87;font-weight:bold&#34;&gt;func&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;main&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt; &lt;span style=&#34;color:#000;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;config&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;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;rest&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;InClusterConfig&lt;/span&gt;&lt;span style=&#34;color:#000;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;logger&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;runtime&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;NewLoggerWithSource&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;main&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;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&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;nil&lt;/span&gt; &lt;span style=&#34;color:#000;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;logger&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;WithError&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;err&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;Fatal&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;Could not create in cluster config&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;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&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;// Access to standard Kubernetes resources through the Kubernetes Clientset
&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;// We don&amp;#39;t actually need this for this example, but it&amp;#39;s just here for
&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;// illustrative purposes
&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:#000&#34;&gt;kubeClient&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;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;kubernetes&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;NewForConfig&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;config&lt;/span&gt;&lt;span style=&#34;color:#000;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:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&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;nil&lt;/span&gt; &lt;span style=&#34;color:#000;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;logger&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;WithError&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;err&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;Fatal&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;Could not create the kubernetes clientset&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;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&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;// Access to the Agones resources through the Agones Clientset
&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;// Note that we reuse the same config as we used for the Kubernetes Clientset
&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:#000&#34;&gt;agonesClient&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;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;versioned&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;NewForConfig&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;config&lt;/span&gt;&lt;span style=&#34;color:#000;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:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&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;nil&lt;/span&gt; &lt;span style=&#34;color:#000;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;logger&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;WithError&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;err&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;Fatal&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;Could not create the agones api clientset&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;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&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 GameServer
&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:#000&#34;&gt;gs&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;agonesv1&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;GameServer&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;ObjectMeta&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;metav1&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;ObjectMeta&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;GenerateName&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;simple-game-server&amp;#34;&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;Namespace&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&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;		&lt;span style=&#34;color:#000&#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:#000&#34;&gt;agonesv1&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;GameServerSpec&lt;/span&gt;&lt;span style=&#34;color:#000;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;Container&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;simple-game-server&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;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;			&lt;span style=&#34;color:#000&#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:#000;font-weight:bold&#34;&gt;[]&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;agonesv1&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;GameServerPort&lt;/span&gt;&lt;span style=&#34;color:#000;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;ContainerPort&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;7654&lt;/span&gt;&lt;span style=&#34;color:#000;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;HostPort&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;7654&lt;/span&gt;&lt;span style=&#34;color:#000;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;Name&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;gameport&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;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;				&lt;span style=&#34;color:#000&#34;&gt;PortPolicy&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;agonesv1&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;Static&lt;/span&gt;&lt;span style=&#34;color:#000;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;Protocol&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;corev1&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;ProtocolUDP&lt;/span&gt;&lt;span style=&#34;color:#000;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;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;Template&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;corev1&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;PodTemplateSpec&lt;/span&gt;&lt;span style=&#34;color:#000;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;Spec&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;corev1&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;PodSpec&lt;/span&gt;&lt;span style=&#34;color:#000;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;Containers&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#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;corev1&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;Container&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;Name&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;simple-game-server&amp;#34;&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;Image&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;us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31&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;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&gt;&lt;/span&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&gt;&lt;/span&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&gt;&lt;/span&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&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#000&#34;&gt;newGS&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;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;agonesClient&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;AgonesV1&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;GameServers&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:#000&#34;&gt;Create&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;context&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;TODO&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;gs&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;metav1&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;CreateOptions&lt;/span&gt;&lt;span style=&#34;color:#000;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:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&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;nil&lt;/span&gt; &lt;span style=&#34;color:#000;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:#204a87&#34;&gt;panic&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;err&lt;/span&gt;&lt;span style=&#34;color:#000;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;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:#000&#34;&gt;fmt&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;Printf&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;New game servers&amp;#39; name is: %s&amp;#34;&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;newGS&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;ObjectMeta&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;Name&lt;/span&gt;&lt;span style=&#34;color:#000;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;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In order to create GS using provided example, you can run it as a Kubernetes Job:&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 create -f https://raw.githubusercontent.com/googleforgames/agones/release-1.39.0/examples/crd-client/create-gs.yaml --namespace agones-system
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get pods --namespace agones-system
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;NAME                                 READY   STATUS      RESTARTS   AGE
create-gs-6wz86-7qsm5                0/1     Completed   0          6s
&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;kubectl logs create-gs-6wz86-7qsm5  --namespace agones-system
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{&amp;#34;message&amp;#34;:&amp;#34;\u0026{0xc0001dde00 default}&amp;#34;,&amp;#34;severity&amp;#34;:&amp;#34;info&amp;#34;,&amp;#34;source&amp;#34;:&amp;#34;main&amp;#34;,&amp;#34;time&amp;#34;:&amp;#34;2020-04-21T11:14:00.477576428Z&amp;#34;}
{&amp;#34;message&amp;#34;:&amp;#34;New GameServer name is: helm-test-server-fxfgg&amp;#34;,&amp;#34;severity&amp;#34;:&amp;#34;info&amp;#34;,&amp;#34;time&amp;#34;:&amp;#34;2020-04-21T11:14:00.516024697Z&amp;#34;}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You have just created a GameServer using Kubernetes Go Client.&lt;/p&gt;
&lt;h2 id=&#34;best-practice-using-informers-and-listers&#34;&gt;Best Practice: Using Informers and Listers&lt;/h2&gt;
&lt;p&gt;Almost all  Kubernetes&amp;rsquo; controllers and custom controllers utilise &lt;code&gt;Informers&lt;/code&gt; and &lt;code&gt;Listers&lt;/code&gt;
to reduce the load on the Kubernetes&amp;rsquo;s control plane.&lt;/p&gt;
&lt;p&gt;Repetitive, direct access of the Kubernetes control plane API can significantly
reduce the performance of the cluster &amp;ndash; and Informers and Listers help resolving that issue.&lt;/p&gt;
&lt;p&gt;Informers and Listers reduce the load on the Kubernetes control plane
by creating, using and maintaining an eventually consistent an in-memory cache.
This can be watched and also queried with zero cost, since it will only read against
its in-memory model of the Kubernetes resources.&lt;/p&gt;
&lt;p&gt;Informer&amp;rsquo;s role and Lister&amp;rsquo;s role are different.&lt;/p&gt;
&lt;p&gt;An Informer is the mechanism for watching a Kubernetes object&amp;rsquo;s event,
such that when a Kubernetes object changes(e.g. CREATE,UPDATE,DELETE), the Informer is informed,
and can execute a callback with the relevant object as an argument.&lt;/p&gt;
&lt;p&gt;This can be very useful for building event based systems against the Kubernetes API.&lt;/p&gt;
&lt;p&gt;A Lister is the mechanism for querying Kubernetes object&amp;rsquo;s against the client side in-memory cache.
Since the Lister stores objects in an in-memory cache, queries against a come at practically no cost.&lt;/p&gt;
&lt;p&gt;Of course, Agones itself also uses Informers and Listers in its codebase.&lt;/p&gt;
&lt;h3 id=&#34;example-1&#34;&gt;Example&lt;/h3&gt;
&lt;p&gt;The following is an example of Informers and Listers,
that show the GameServer&amp;rsquo;s name &amp;amp; status &amp;amp; IPs in the Kubernetes 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-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;package&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;main&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:#204a87;font-weight:bold&#34;&gt;import&lt;/span&gt; &lt;span style=&#34;color:#000;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:#4e9a06&#34;&gt;&amp;#34;context&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;&amp;#34;time&amp;#34;&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:#4e9a06&#34;&gt;&amp;#34;agones.dev/agones/pkg/client/clientset/versioned&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;&amp;#34;agones.dev/agones/pkg/client/informers/externalversions&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;&amp;#34;agones.dev/agones/pkg/util/runtime&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;&amp;#34;k8s.io/apimachinery/pkg/labels&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;&amp;#34;k8s.io/client-go/informers&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;&amp;#34;k8s.io/client-go/kubernetes&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;&amp;#34;k8s.io/client-go/tools/cache&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:#000;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:#204a87;font-weight:bold&#34;&gt;func&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;main&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt; &lt;span style=&#34;color:#000;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;config&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;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;rest&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;InClusterConfig&lt;/span&gt;&lt;span style=&#34;color:#000;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;logger&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;runtime&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;NewLoggerWithSource&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;main&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;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&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;nil&lt;/span&gt; &lt;span style=&#34;color:#000;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;logger&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;WithError&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;err&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;Fatal&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;Could not create in cluster config&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;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&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#000&#34;&gt;kubeClient&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;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;kubernetes&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;NewForConfig&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;config&lt;/span&gt;&lt;span style=&#34;color:#000;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;agonesClient&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;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;versioned&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;NewForConfig&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;config&lt;/span&gt;&lt;span style=&#34;color:#000;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:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&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;nil&lt;/span&gt; &lt;span style=&#34;color:#000;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;logger&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;WithError&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;err&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;Fatal&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;Could not create the agones api clientset&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;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&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 InformerFactory which create the informer
&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:#000&#34;&gt;informerFactory&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;informers&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;NewSharedInformerFactory&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;kubeClient&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;time&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;Second&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;30&lt;/span&gt;&lt;span style=&#34;color:#000;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;agonesInformerFactory&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;externalversions&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;NewSharedInformerFactory&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;agonesClient&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;time&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;Second&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;30&lt;/span&gt;&lt;span style=&#34;color:#000;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;// Create Pod informer by informerFactory
&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:#000&#34;&gt;podInformer&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;informerFactory&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;Core&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;V1&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;Pods&lt;/span&gt;&lt;span style=&#34;color:#000;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;// Create GameServer informer by informerFactory
&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:#000&#34;&gt;gameServers&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;agonesInformerFactory&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;Agones&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;V1&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;GameServers&lt;/span&gt;&lt;span style=&#34;color:#000;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;gsInformer&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;gameServers&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;Informer&lt;/span&gt;&lt;span style=&#34;color:#000;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 EventHandler to informer
&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;// When the object&amp;#39;s event happens, the function will be called
&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;// For example, when the pod is added, &amp;#39;AddFunc&amp;#39; will be called and put out the &amp;#34;Pod Added&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:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;	&lt;span style=&#34;color:#000&#34;&gt;podInformer&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;Informer&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;AddEventHandler&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;cache&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;ResourceEventHandlerFuncs&lt;/span&gt;&lt;span style=&#34;color:#000;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;AddFunc&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;func&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;new&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;interface&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#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;logger&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;Infof&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;Pod Added&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;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;UpdateFunc&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;func&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;old&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;new&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;interface&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#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;logger&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;Infof&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;Pod Updated&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;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;DeleteFunc&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;func&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;old&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;interface&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#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;logger&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;Infof&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;Pod Deleted&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;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;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;gsInformer&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;AddEventHandler&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;cache&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;ResourceEventHandlerFuncs&lt;/span&gt;&lt;span style=&#34;color:#000;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;AddFunc&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;func&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;new&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;interface&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#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;logger&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;Infof&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;GameServer Added&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;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;UpdateFunc&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;func&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;old&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;new&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;interface&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#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;logger&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;Infof&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;GameServer Updated&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;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;DeleteFunc&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;func&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;old&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;interface&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#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;logger&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;Infof&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;GameServer Deleted&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;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;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:#000&#34;&gt;ctx&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;context&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;Background&lt;/span&gt;&lt;span style=&#34;color:#000;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;// Start Go routines for informer
&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:#000&#34;&gt;informerFactory&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;Start&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;ctx&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;Done&lt;/span&gt;&lt;span style=&#34;color:#000;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;agonesInformerFactory&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;Start&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;ctx&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;Done&lt;/span&gt;&lt;span style=&#34;color:#000;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:#8f5902;font-style:italic&#34;&gt;// Wait until finish caching with List API
&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:#000&#34;&gt;informerFactory&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;WaitForCacheSync&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;ctx&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;Done&lt;/span&gt;&lt;span style=&#34;color:#000;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;agonesInformerFactory&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;WaitForCacheSync&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;ctx&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;Done&lt;/span&gt;&lt;span style=&#34;color:#000;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;// Create Lister which can list objects from the in-memory-cache
&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:#000&#34;&gt;podLister&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;podInformer&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;Lister&lt;/span&gt;&lt;span style=&#34;color:#000;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;gsLister&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;gameServers&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;Lister&lt;/span&gt;&lt;span style=&#34;color:#000;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:#204a87;font-weight:bold&#34;&gt;for&lt;/span&gt; &lt;span style=&#34;color:#000;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:#8f5902;font-style:italic&#34;&gt;// Get List objects of Pods from Pod Lister
&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:#000&#34;&gt;p&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;podLister&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;Pods&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&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;// Get List objects of GameServers from GameServer Lister
&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:#000&#34;&gt;gs&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;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;gsLister&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;List&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;labels&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;Everything&lt;/span&gt;&lt;span style=&#34;color:#000;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:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&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;nil&lt;/span&gt; &lt;span style=&#34;color:#000;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:#204a87&#34;&gt;panic&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;err&lt;/span&gt;&lt;span style=&#34;color:#000;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;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:#8f5902;font-style:italic&#34;&gt;// Show GameServer&amp;#39;s name &amp;amp; status &amp;amp; IPs
&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:#204a87;font-weight:bold&#34;&gt;for&lt;/span&gt; &lt;span style=&#34;color:#000&#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;g&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;range&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;gs&lt;/span&gt; &lt;span style=&#34;color:#000;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;a&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;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;p&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;Get&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;g&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;GetName&lt;/span&gt;&lt;span style=&#34;color:#000;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:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&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;nil&lt;/span&gt; &lt;span style=&#34;color:#000;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:#204a87&#34;&gt;panic&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;err&lt;/span&gt;&lt;span style=&#34;color:#000;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;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;logger&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;Infof&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;------------------------------&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;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;			&lt;span style=&#34;color:#000&#34;&gt;logger&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;Infof&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;Name: %s&amp;#34;&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;g&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;GetName&lt;/span&gt;&lt;span style=&#34;color:#000;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;logger&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;Infof&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;Status: %s&amp;#34;&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;g&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;Status&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;State&lt;/span&gt;&lt;span style=&#34;color:#000;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;logger&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;Infof&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;External IP: %s&amp;#34;&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;g&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;Status&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;Address&lt;/span&gt;&lt;span style=&#34;color:#000;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;logger&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;Infof&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;Internal IP: %s&amp;#34;&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;a&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;Status&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;PodIP&lt;/span&gt;&lt;span style=&#34;color:#000;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;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;time&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;Sleep&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;time&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;Second&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;25&lt;/span&gt;&lt;span style=&#34;color:#000;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;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;font-weight:bold&#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 list GameServer&amp;rsquo;s name and status and IPs using Kubernetes Informers and Listers.&lt;/p&gt;
&lt;h2 id=&#34;direct-access-to-the-rest-api-via-kubectl&#34;&gt;Direct Access to the REST API via Kubectl&lt;/h2&gt;
&lt;p&gt;If there isn&amp;rsquo;t a client written in your preferred language, it is always possible to communicate
directly with Kubernetes API to interact with Agones.&lt;/p&gt;
&lt;p&gt;The Kubernetes API can be authenticated and exposed locally through the
&lt;a href=&#34;https://kubernetes.io/docs/tasks/extend-kubernetes/http-proxy-access-api/&#34;&gt;&lt;code&gt;kubectl proxy&lt;/code&gt;&lt;/a&gt;&lt;/p&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-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl proxy &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Starting to serve on 127.0.0.1:8001
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;list-all-agones-endpoints&#34;&gt;List all Agones endpoints&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;curl http://localhost:8001/apis &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; grep agones -A &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;5&lt;/span&gt; -B &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{
    &amp;#34;name&amp;#34;: &amp;#34;agones.dev&amp;#34;,
    &amp;#34;versions&amp;#34;: [
    {
        &amp;#34;groupVersion&amp;#34;: &amp;#34;agones.dev/v1&amp;#34;,
        &amp;#34;version&amp;#34;: &amp;#34;v1&amp;#34;
    }
    ],
    &amp;#34;preferredVersion&amp;#34;: {
    &amp;#34;groupVersion&amp;#34;: &amp;#34;agones.dev/v1&amp;#34;,
    &amp;#34;version&amp;#34;: &amp;#34;v1&amp;#34;
    },
    &amp;#34;serverAddressByClientCIDRs&amp;#34;: null
}
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;list-agones-resources&#34;&gt;List Agones resources&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;curl http://localhost:8001/apis/agones.dev/v1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{
  &amp;#34;kind&amp;#34;: &amp;#34;APIResourceList&amp;#34;,
  &amp;#34;apiVersion&amp;#34;: &amp;#34;v1&amp;#34;,
  &amp;#34;groupVersion&amp;#34;: &amp;#34;agones.dev/v1&amp;#34;,
  &amp;#34;resources&amp;#34;: [
    {
      &amp;#34;name&amp;#34;: &amp;#34;gameservers&amp;#34;,
      &amp;#34;singularName&amp;#34;: &amp;#34;gameserver&amp;#34;,
      &amp;#34;namespaced&amp;#34;: true,
      &amp;#34;kind&amp;#34;: &amp;#34;GameServer&amp;#34;,
      &amp;#34;verbs&amp;#34;: [
        &amp;#34;delete&amp;#34;,
        &amp;#34;deletecollection&amp;#34;,
        &amp;#34;get&amp;#34;,
        &amp;#34;list&amp;#34;,
        &amp;#34;patch&amp;#34;,
        &amp;#34;create&amp;#34;,
        &amp;#34;update&amp;#34;,
        &amp;#34;watch&amp;#34;
      ],
      &amp;#34;shortNames&amp;#34;: [
        &amp;#34;gs&amp;#34;
      ]
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;list-all-gameservers-in-the-default-namespace&#34;&gt;List all gameservers in the default namespace&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;curl http://localhost:8001/apis/agones.dev/v1/namespaces/default/gameservers
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{
    &amp;#34;apiVersion&amp;#34;: &amp;#34;agones.dev/v1&amp;#34;,
    &amp;#34;items&amp;#34;: [
        {
            &amp;#34;apiVersion&amp;#34;: &amp;#34;agones.dev/v1&amp;#34;,
            &amp;#34;kind&amp;#34;: &amp;#34;GameServer&amp;#34;,
            &amp;#34;metadata&amp;#34;: {
                &amp;#34;annotations&amp;#34;: {
                    &amp;#34;kubectl.kubernetes.io/last-applied-configuration&amp;#34;: &amp;#34;{\&amp;#34;apiVersion\&amp;#34;:\&amp;#34;agones.dev/v1\&amp;#34;,\&amp;#34;kind\&amp;#34;:\&amp;#34;GameServer\&amp;#34;,\&amp;#34;metadata\&amp;#34;:{\&amp;#34;annotations\&amp;#34;:{},\&amp;#34;name\&amp;#34;:\&amp;#34;simple-game-server\&amp;#34;,\&amp;#34;namespace\&amp;#34;:\&amp;#34;default\&amp;#34;},\&amp;#34;spec\&amp;#34;:{\&amp;#34;containerPort\&amp;#34;:7654,\&amp;#34;hostPort\&amp;#34;:7777,\&amp;#34;portPolicy\&amp;#34;:\&amp;#34;static\&amp;#34;,\&amp;#34;template\&amp;#34;:{\&amp;#34;spec\&amp;#34;:{\&amp;#34;containers\&amp;#34;:[{\&amp;#34;image\&amp;#34;:\&amp;#34;us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31\&amp;#34;,\&amp;#34;name\&amp;#34;:\&amp;#34;simple-game-server\&amp;#34;}]}}}}\n&amp;#34;
                },
                &amp;#34;clusterName&amp;#34;: &amp;#34;&amp;#34;,
                &amp;#34;creationTimestamp&amp;#34;: &amp;#34;2018-03-02T21:41:05Z&amp;#34;,
                &amp;#34;finalizers&amp;#34;: [
                    &amp;#34;agones.dev&amp;#34;
                ],
                &amp;#34;generation&amp;#34;: 0,
                &amp;#34;name&amp;#34;: &amp;#34;simple-game-server&amp;#34;,
                &amp;#34;namespace&amp;#34;: &amp;#34;default&amp;#34;,
                &amp;#34;resourceVersion&amp;#34;: &amp;#34;760&amp;#34;,
                &amp;#34;selfLink&amp;#34;: &amp;#34;/apis/agones.dev/v1/namespaces/default/gameservers/simple-game-server&amp;#34;,
                &amp;#34;uid&amp;#34;: &amp;#34;692beea6-1e62-11e8-beb2-080027637781&amp;#34;
            },
            &amp;#34;spec&amp;#34;: {
                &amp;#34;PortPolicy&amp;#34;: &amp;#34;Static&amp;#34;,
                &amp;#34;container&amp;#34;: &amp;#34;simple-game-server&amp;#34;,
                &amp;#34;containerPort&amp;#34;: 7654,
                &amp;#34;health&amp;#34;: {
                    &amp;#34;failureThreshold&amp;#34;: 3,
                    &amp;#34;initialDelaySeconds&amp;#34;: 5,
                    &amp;#34;periodSeconds&amp;#34;: 5
                },
                &amp;#34;hostPort&amp;#34;: 7777,
                &amp;#34;protocol&amp;#34;: &amp;#34;UDP&amp;#34;,
                &amp;#34;template&amp;#34;: {
                    &amp;#34;metadata&amp;#34;: {
                        &amp;#34;creationTimestamp&amp;#34;: null
                    },
                    &amp;#34;spec&amp;#34;: {
                        &amp;#34;containers&amp;#34;: [
                            {
                                &amp;#34;image&amp;#34;: &amp;#34;us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31&amp;#34;,
                                &amp;#34;name&amp;#34;: &amp;#34;simple-game-server&amp;#34;,
                                &amp;#34;resources&amp;#34;: {}
                            }
                        ]
                    }
                }
            },
            &amp;#34;status&amp;#34;: {
                &amp;#34;address&amp;#34;: &amp;#34;192.168.99.100&amp;#34;,
                &amp;#34;nodeName&amp;#34;: &amp;#34;agones&amp;#34;,
                &amp;#34;port&amp;#34;: 7777,
                &amp;#34;state&amp;#34;: &amp;#34;Ready&amp;#34;
            }
        }
    ],
    &amp;#34;kind&amp;#34;: &amp;#34;GameServerList&amp;#34;,
    &amp;#34;metadata&amp;#34;: {
        &amp;#34;continue&amp;#34;: &amp;#34;&amp;#34;,
        &amp;#34;resourceVersion&amp;#34;: &amp;#34;1062&amp;#34;,
        &amp;#34;selfLink&amp;#34;: &amp;#34;/apis/agones.dev/v1/namespaces/default/gameservers&amp;#34;
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;allocate-a-gameserver-from-a-fleet-named-simple-game-server-with-gameserverallocation&#34;&gt;Allocate a gameserver from a fleet named &amp;lsquo;simple-game-server&amp;rsquo;, with GameServerAllocation&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;curl -d &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;{&amp;#34;apiVersion&amp;#34;:&amp;#34;allocation.agones.dev/v1&amp;#34;,&amp;#34;kind&amp;#34;:&amp;#34;GameServerAllocation&amp;#34;,&amp;#34;spec&amp;#34;:{&amp;#34;required&amp;#34;:{&amp;#34;matchLabels&amp;#34;:{&amp;#34;agones.dev/fleet&amp;#34;:&amp;#34;simple-game-server&amp;#34;}}}}&amp;#39;&lt;/span&gt; -H &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt; -X POST http://localhost:8001/apis/allocation.agones.dev/v1/namespaces/default/gameserverallocations
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{
    &amp;#34;kind&amp;#34;: &amp;#34;GameServerAllocation&amp;#34;,
    &amp;#34;apiVersion&amp;#34;: &amp;#34;allocation.agones.dev/v1&amp;#34;,
    &amp;#34;metadata&amp;#34;: {
        &amp;#34;name&amp;#34;: &amp;#34;simple-game-server-v6jwb-cmdcv&amp;#34;,
        &amp;#34;namespace&amp;#34;: &amp;#34;default&amp;#34;,
        &amp;#34;creationTimestamp&amp;#34;: &amp;#34;2019-07-03T17:19:47Z&amp;#34;
    },
    &amp;#34;spec&amp;#34;: {
        &amp;#34;multiClusterSetting&amp;#34;: {
            &amp;#34;policySelector&amp;#34;: {}
        },
        &amp;#34;required&amp;#34;: {
            &amp;#34;matchLabels&amp;#34;: {
                &amp;#34;agones.dev/fleet&amp;#34;: &amp;#34;simple-game-server&amp;#34;
            }
        },
        &amp;#34;scheduling&amp;#34;: &amp;#34;Packed&amp;#34;,
        &amp;#34;metadata&amp;#34;: {}
    },
    &amp;#34;status&amp;#34;: {
        &amp;#34;state&amp;#34;: &amp;#34;Allocated&amp;#34;,
        &amp;#34;gameServerName&amp;#34;: &amp;#34;simple-game-server-v6jwb-cmdcv&amp;#34;,
        &amp;#34;ports&amp;#34;: [
            {
                &amp;#34;name&amp;#34;: &amp;#34;default&amp;#34;,
                &amp;#34;port&amp;#34;: 7445
            }
        ],
        &amp;#34;address&amp;#34;: &amp;#34;34.94.118.237&amp;#34;,
        &amp;#34;nodeName&amp;#34;: &amp;#34;gke-test-cluster-default-f11755a7-5km3&amp;#34;
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You may wish to review the &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/&#34;&gt;Agones Kubernetes API&lt;/a&gt; for the full data structure reference.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://kubernetes.io/docs/reference/using-api/api-concepts/&#34;&gt;Kubernetes API Concepts&lt;/a&gt;
section may also provide the more details on the API conventions that are used in the Kubernetes API.&lt;/p&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;Next Steps&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Learn how to use &lt;a href=&#34;/site/site/docs/advanced/allocator-service/&#34;&gt;Allocator Service&lt;/a&gt; for single and multi-cluster Allocation.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Troubleshooting</title>
      <link>/site/docs/guides/troubleshooting/</link>
      <pubDate>Thu, 03 Jan 2019 01:20:49 +0000</pubDate>
      
      <guid>/site/docs/guides/troubleshooting/</guid>
      <description>
        
        
        &lt;h2 id=&#34;something-went-wrong-with-my-gameserver&#34;&gt;Something went wrong with my GameServer&lt;/h2&gt;
&lt;p&gt;If there is something going wrong with your GameServer, there are a few approaches to determining the cause:&lt;/p&gt;
&lt;h3 id=&#34;run-with-the-local-sdk-server&#34;&gt;Run with the local SDK server&lt;/h3&gt;
&lt;p&gt;A good first step for seeing what may be going wrong is replicating the issue locally. To do this you can take
advantage of the Agones &lt;a href=&#34;/site/site/docs/guides/local-game-server/&#34;&gt;local SDK server&lt;/a&gt;
, with the following troubleshooting steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Run your game server as a local binary against the local SDK server&lt;/li&gt;
&lt;li&gt;Run your game server container against the local SDK server. It&amp;rsquo;s worth noting that running with
&lt;code&gt;docker run --network=host ...&lt;/code&gt; can be an easy way to allow your game server container(s) access to the local SDK
server)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;At each stage, keep an eye on the logs of your game server binary, and the local SDK server, and ensure there are no system
errors.&lt;/p&gt;
&lt;h3 id=&#34;run-as-a-gameserver-rather-than-a-fleet&#34;&gt;Run as a &lt;code&gt;GameServer&lt;/code&gt; rather than a &lt;code&gt;Fleet&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;A &lt;code&gt;Fleet&lt;/code&gt; will automatically replace any unhealthy &lt;code&gt;GameServer&lt;/code&gt; under its control - which can make it hard to catch
all the details to determine the cause.&lt;/p&gt;
&lt;p&gt;To work around this, instantiate a single instance of your game server as a&lt;br&gt;
&lt;a href=&#34;/site/site/docs/reference/gameserver/&#34;&gt;GameServer&lt;/a&gt; within your Agones cluster.&lt;/p&gt;
&lt;p&gt;This &lt;code&gt;GameServer&lt;/code&gt; will not be replaced if it moves to an Unhealthy state, giving you time to introspect what is
going wrong.&lt;/p&gt;
&lt;h3 id=&#34;introspect-with-kubernetes-tooling&#34;&gt;Introspect with Kubernetes tooling&lt;/h3&gt;
&lt;p&gt;There are many Kubernetes tools that will help with determining where things have potentially gone wrong for your
game server. Here are a few you may want to try.&lt;/p&gt;
&lt;h4 id=&#34;kubectl-describe&#34;&gt;kubectl describe&lt;/h4&gt;
&lt;p&gt;Depending on what is happening, you may want to run &lt;code&gt;kubectl describe &amp;lt;gameserver name&amp;gt;&lt;/code&gt; to view the events
that are associated with that particular &lt;code&gt;GameServer&lt;/code&gt; resource. This can give you insight into the lifecycle of the
&lt;code&gt;GameServer&lt;/code&gt; and if anything has gone wrong.&lt;/p&gt;
&lt;p&gt;For example, here we can see where the simple-game-server example has been moved to the &lt;code&gt;Unhealthy&lt;/code&gt; state
due to a crash in the backing &lt;code&gt;GameServer&lt;/code&gt; Pod container&amp;rsquo;s binary.&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 describe gs simple-game-server-zqppv
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Name:         simple-game-server-zqppv
Namespace:    default
Labels:       &amp;lt;none&amp;gt;
Annotations:  agones.dev/sdk-version: 1.0.0-dce1546
API Version:  agones.dev/v1
Kind:         GameServer
Metadata:
  Creation Timestamp:  2019-08-16T21:25:44Z
  Finalizers:
    agones.dev
  Generate Name:     simple-game-server-
  Generation:        1
  Resource Version:  1378575
  Self Link:         /apis/agones.dev/v1/namespaces/default/gameservers/simple-game-server-zqppv
  UID:               6818adc7-c06c-11e9-8dbd-42010a8a0109
Spec:
  Container:  simple-game-server
  Health:
    Failure Threshold:      3
    Initial Delay Seconds:  5
    Period Seconds:         5
  Ports:
    Container Port:  7654
    Host Port:       7058
    Name:            default
    Port Policy:     Dynamic
    Protocol:        UDP
  Scheduling:        Packed
  Template:
    Metadata:
      Creation Timestamp:  &amp;lt;nil&amp;gt;
    Spec:
      Containers:
        Image:  us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31
        Name:   simple-game-server
        Resources:
          Limits:
            Cpu:     20m
            Memory:  32Mi
          Requests:
            Cpu:     20m
            Memory:  32Mi
Status:
  Address:    35.230.59.117
  Node Name:  gke-test-cluster-default-590db5e4-4s6r
  Ports:
    Name:          default
    Port:          7058
  Reserved Until:  &amp;lt;nil&amp;gt;
  State:           Unhealthy
Events:
  Type     Reason          Age   From                   Message
  ----     ------          ----  ----                   -------
  Normal   PortAllocation  72s   gameserver-controller  Port allocated
  Normal   Creating        72s   gameserver-controller  Pod simple-game-server-zqppv created
  Normal   Scheduled       72s   gameserver-controller  Address and port populated
  Normal   RequestReady    67s   gameserver-sidecar     SDK state change
  Normal   Ready           66s   gameserver-controller  SDK.Ready() complete
  Warning  Unhealthy       34s   health-controller      Issue with Gameserver pod
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The backing Pod has the same name as the &lt;code&gt;GameServer&lt;/code&gt; - so it&amp;rsquo;s also worth looking at the
details and events for the Pod to see if there are any issues there, such as restarts due to binary crashes etc.&lt;/p&gt;
&lt;p&gt;For example, you can see the restart count on the us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31 container
is set to &lt;code&gt;1&lt;/code&gt;, due to the game server binary crash&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 describe pod simple-game-server-zqppv
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Name:               simple-game-server-zqppv
Namespace:          default
Priority:           0
PriorityClassName:  &amp;lt;none&amp;gt;
Node:               gke-test-cluster-default-590db5e4-4s6r/10.138.0.23
Start Time:         Fri, 16 Aug 2019 21:25:44 +0000
Labels:             agones.dev/gameserver=simple-game-server-zqppv
                    agones.dev/role=gameserver
Annotations:        agones.dev/container: simple-game-server
                    agones.dev/sdk-version: 1.0.0-dce1546
                    cluster-autoscaler.kubernetes.io/safe-to-evict: false
Status:             Running
IP:                 10.48.1.80
Controlled By:      GameServer/simple-game-server-zqppv
Containers:
  simple-game-server:
    Container ID:   docker://69eacd03cc89b0636b78abe47926b02183ba84d18fa20649ca443f5232511661
    Image:          us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31
    Image ID:       docker-pullable://gcr.io/agones-images/simple-game-server@sha256:6a60eff5e68b88b5ce75ae98082d79cff36cda411a090f3495760e5c3b6c3575
    Port:           7654/UDP
    Host Port:      7058/UDP
    State:          Running
      Started:      Fri, 16 Aug 2019 21:26:22 +0000
    Last State:     Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Fri, 16 Aug 2019 21:25:45 +0000
      Finished:     Fri, 16 Aug 2019 21:26:22 +0000
    Ready:          True
    Restart Count:  1
    Limits:
      cpu:     20m
      memory:  32Mi
    Requests:
      cpu:        20m
      memory:     32Mi
    Liveness:     http-get http://:8080/gshealthz delay=5s timeout=1s period=5s #success=1 #failure=3
    Environment:  &amp;lt;none&amp;gt;
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from empty (ro)
  agones-gameserver-sidecar:
    Container ID:   docker://f3c475c34d26232e19b60be65b03bc6ce41931f4c37e00770d3ab4a36281d31c
    Image:          gcr.io/agones-mark/agones-sdk:1.0.0-dce1546
    Image ID:       docker-pullable://gcr.io/agones-mark/agones-sdk@sha256:4b5693e95ee3023a2b2e2099d102bb6bac58d4ce0ac472e58a09cee6d160cd19
    Port:           &amp;lt;none&amp;gt;
    Host Port:      &amp;lt;none&amp;gt;
    State:          Running
      Started:      Fri, 16 Aug 2019 21:25:48 +0000
    Ready:          True
    Restart Count:  0
    Requests:
      cpu:     30m
    Liveness:  http-get http://:8080/healthz delay=3s timeout=1s period=3s #success=1 #failure=3
    Environment:
      GAMESERVER_NAME:  simple-game-server-zqppv
      POD_NAMESPACE:    default (v1:metadata.namespace)
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from agones-sdk-token-vr6qq (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             True
  ContainersReady   True
  PodScheduled      True
Volumes:
  empty:
    Type:    EmptyDir (a temporary directory that shares a pod&amp;#39;s lifetime)
    Medium:
  agones-sdk-token-vr6qq:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  agones-sdk-token-vr6qq
    Optional:    false
QoS Class:       Burstable
Node-Selectors:  &amp;lt;none&amp;gt;
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type    Reason     Age                   From                                             Message
  ----    ------     ----                  ----                                             -------
  Normal  Scheduled  2m32s                 default-scheduler                                Successfully assigned default/simple-game-server-zqppv to gke-test-cluster-default-590db5e4-4s6r
  Normal  Pulling    2m31s                 kubelet, gke-test-cluster-default-590db5e4-4s6r  pulling image &amp;#34;gcr.io/agones-mark/agones-sdk:1.0.0-dce1546&amp;#34;
  Normal  Started    2m28s                 kubelet, gke-test-cluster-default-590db5e4-4s6r  Started container
  Normal  Pulled     2m28s                 kubelet, gke-test-cluster-default-590db5e4-4s6r  Successfully pulled image &amp;#34;gcr.io/agones-mark/agones-sdk:1.0.0-dce1546&amp;#34;
  Normal  Created    2m28s                 kubelet, gke-test-cluster-default-590db5e4-4s6r  Created container
  Normal  Created    114s (x2 over 2m31s)  kubelet, gke-test-cluster-default-590db5e4-4s6r  Created container
  Normal  Started    114s (x2 over 2m31s)  kubelet, gke-test-cluster-default-590db5e4-4s6r  Started container
  Normal  Pulled     114s (x2 over 2m31s)  kubelet, gke-test-cluster-default-590db5e4-4s6r  Container image &amp;#34;us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31&amp;#34; already present on machine
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Finally, you can also get the logs of your &lt;code&gt;GameServer&lt;/code&gt; &lt;code&gt;Pod&lt;/code&gt; as well via &lt;code&gt;kubectl logs &amp;lt;pod name&amp;gt; -c &amp;lt;game server container name&amp;gt;&lt;/code&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-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl logs simple-game-server-zqppv -c simple-game-server
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;2019/08/16 21:26:23 Creating SDK instance
2019/08/16 21:26:24 Starting Health Ping
2019/08/16 21:26:24 Starting UDP server, listening on port 7654
2019/08/16 21:26:24 Marking this server as ready
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The above commands will only give the most recent container&amp;rsquo;s logs (so we won&amp;rsquo;t get the previous crash), but
you can use &lt;code&gt;kubectl logs --previous=true simple-game-server-zqppv -c simple-game-server&lt;/code&gt; to get the previous instance of the containers logs, or
use your Kubernetes platform of choice&amp;rsquo;s logging aggregation tools to view the crash details.&lt;/p&gt;
&lt;h4 id=&#34;kubectl-events&#34;&gt;kubectl events&lt;/h4&gt;
&lt;p&gt;The &amp;ldquo;Events&amp;rdquo; section that is seen at the bottom of a &lt;code&gt;kubectl describe&lt;/code&gt; is backed an actual &lt;code&gt;Event&lt;/code&gt; record in
Kubernetes, which can be queried - and is general persistent for an hour after it is created.&lt;/p&gt;
&lt;p&gt;Therefore, even a &lt;code&gt;GameServer&lt;/code&gt; or &lt;code&gt;Pod&lt;/code&gt; resource is no longer available in the system, its &lt;code&gt;Events&lt;/code&gt; may well be.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;kubectl get events&lt;/code&gt; can be used to see all these events. This can also be grepped with the GameServer name to see
all events across both the &lt;code&gt;GameServer&lt;/code&gt; and its backing &lt;code&gt;Pod&lt;/code&gt;, like so:&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 events &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; grep simple-game-server-v992s-jwpx2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;2m47s       Normal   PortAllocation          gameserver/simple-game-server-v992s-jwpx2   Port allocated
2m47s       Normal   Creating                gameserver/simple-game-server-v992s-jwpx2   Pod simple-game-server-v992s-jwpx2 created
2m47s       Normal   Scheduled               pod/simple-game-server-v992s-jwpx2          Successfully assigned default/simple-game-server-v992s-jwpx2 to gke-test-cluster-default-77e7f57d-j1mp
2m47s       Normal   Scheduled               gameserver/simple-game-server-v992s-jwpx2   Address and port populated
2m46s       Normal   Pulled                  pod/simple-game-server-v992s-jwpx2          Container image &amp;#34;us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31&amp;#34; already present on machine
2m46s       Normal   Created                 pod/simple-game-server-v992s-jwpx2          Created container simple-game-server
2m45s       Normal   Started                 pod/simple-game-server-v992s-jwpx2          Started container simple-game-server
2m45s       Normal   Pulled                  pod/simple-game-server-v992s-jwpx2          Container image &amp;#34;gcr.io/agones-images/agones-sdk:1.7.0&amp;#34; already present on machine
2m45s       Normal   Created                 pod/simple-game-server-v992s-jwpx2          Created container agones-gameserver-sidecar
2m45s       Normal   Started                 pod/simple-game-server-v992s-jwpx2          Started container agones-gameserver-sidecar
2m45s       Normal   RequestReady            gameserver/simple-game-server-v992s-jwpx2   SDK state change
2m45s       Normal   Ready                   gameserver/simple-game-server-v992s-jwpx2   SDK.Ready() complete
2m47s       Normal   SuccessfulCreate        gameserverset/simple-game-server-v992s      Created gameserver: simple-game-server-v992s-jwpx2
&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;other-techniques&#34;&gt;Other techniques&lt;/h4&gt;
&lt;p&gt;For more tips and tricks, the &lt;a href=&#34;https://kubernetes.io/docs/reference/kubectl/cheatsheet/#interacting-with-running-pods&#34;&gt;Kubernetes Cheatsheet: Interactive with Pods&lt;/a&gt;
also provides more troubleshooting techniques.&lt;/p&gt;
&lt;h2 id=&#34;how-do-i-see-the-logs-for-agones&#34;&gt;How do I see the logs for Agones?&lt;/h2&gt;
&lt;p&gt;If something is going wrong, and you want to see the logs for Agones, there are potentially two places you will want to
check:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The controller: assuming you installed Agones in the &lt;code&gt;agones-system&lt;/code&gt; namespace, you will find that there
is a single pod called &lt;code&gt;agones-controller-&amp;lt;hash&amp;gt;&lt;/code&gt; (where hash is the unique code that Kubernetes generates)
that exists there, that you can get the logs from. This is the main
controller for Agones, and should be the first place to check when things go wrong.
&lt;ol&gt;
&lt;li&gt;To get the logs from this controller run:&lt;br&gt;
&lt;code&gt;kubectl logs --namespace=agones-system agones-controller-&amp;lt;hash&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;The SDK server sidecar: Agones runs a small &lt;a href=&#34;https://grpc.io/&#34;&gt;gRPC&lt;/a&gt; + http server for the SDK in a container in the
same network namespace as the game server container to connect to via the SDK.&lt;br&gt;
The logs from this SDK server are also useful for tracking down issues, especially if you are having trouble with a
particular &lt;code&gt;GameServer&lt;/code&gt;.
&lt;ol&gt;
&lt;li&gt;To find the &lt;code&gt;Pod&lt;/code&gt; for the &lt;code&gt;GameServer&lt;/code&gt; look for the pod with a name that is prefixed with the name of the
owning &lt;code&gt;GameServer&lt;/code&gt;. For example if you have a &lt;code&gt;GameServer&lt;/code&gt; named &lt;code&gt;simple-game-server&lt;/code&gt;, it&amp;rsquo;s pod could potentially be named
&lt;code&gt;simple-game-server-dnbwj&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;To get the logs from that &lt;code&gt;Pod&lt;/code&gt;, we need to specify that we want the logs from the &lt;code&gt;agones-gameserver-sidecar&lt;/code&gt;
container. To do that, run the following:&lt;br&gt;
&lt;code&gt;kubectl logs simple-game-server-dnbwj -c agones-gameserver-sidecar&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Agones uses JSON structured logging, therefore errors will be visible through the &lt;code&gt;&amp;quot;severity&amp;quot;:&amp;quot;info&amp;quot;&lt;/code&gt; key and value.&lt;/p&gt;
&lt;h3 id=&#34;enable-debug-level-logging-for-the-sdk-server&#34;&gt;Enable Debug Level Logging for the SDK Server&lt;/h3&gt;
&lt;p&gt;By default, the SDK Server binary is set to an &lt;code&gt;Info&lt;/code&gt; level of logging.&lt;/p&gt;
&lt;p&gt;You can use the &lt;code&gt;sdkServer.logLevel&lt;/code&gt; to increase this to &lt;code&gt;Debug&lt;/code&gt; levels, and see extra information about what is
happening with the SDK Server that runs alonside your game server container(s).&lt;/p&gt;
&lt;p&gt;See the &lt;a href=&#34;/site/site/docs/reference/gameserver/&#34;&gt;GameServer reference&lt;/a&gt; for configuration details.&lt;/p&gt;
&lt;h3 id=&#34;enable-debug-level-logging-for-the-agones-controller&#34;&gt;Enable Debug Level Logging for the Agones Controller&lt;/h3&gt;
&lt;p&gt;By default, the log level for the Agones controller is &amp;ldquo;info&amp;rdquo;. To get a more verbose log output, switch this to &amp;ldquo;debug&amp;rdquo;
via the &lt;code&gt;agones.controller.logLevel&lt;/code&gt;
&lt;a href=&#34;/site/site/docs/installation/install-agones/helm/#configuration&#34;&gt;Helm Configuration parameters&lt;/a&gt;
at installation.&lt;/p&gt;
&lt;h2 id=&#34;the-feature-flag-i-enableddisabled-isnt-working-as-expected&#34;&gt;The Feature Flag I enabled/disabled isn&amp;rsquo;t working as expected&lt;/h2&gt;
&lt;p&gt;It&amp;rsquo;s entirely possible that Alpha features may still have bugs in them (They are &lt;em&gt;alpha&lt;/em&gt; after all 😃), but the first
thing to check is what the actual &lt;a href=&#34;/site/site/docs/guides/feature-stages/#feature-gates&#34;&gt;Feature Flags&lt;/a&gt; states
were passed to Agones are, and that they were set correctly.&lt;/p&gt;
&lt;p&gt;The easiest way is to check the top &lt;code&gt;info&lt;/code&gt; level log lines from the Agones controller.&lt;/p&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-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ kubectl logs -n agones-system agones-controller-7575dc59-7p2rg  &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; head
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&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;#34;filename&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;/home/agones/logs/agones-controller-20220615_211540.log&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;message&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;logging to file&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;numbackups&amp;#34;&lt;/span&gt;:99,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;severity&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;info&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;source&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;main&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;time&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;2022-06-15T21:15:40.309349789Z&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;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:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;logLevel&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;info&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;message&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Setting LogLevel configuration&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;severity&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;info&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;source&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;main&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;time&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;2022-06-15T21:15:40.309403296Z&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;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:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;ctlConf&amp;#34;&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;#34;MinPort&amp;#34;&lt;/span&gt;:7000,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;MaxPort&amp;#34;&lt;/span&gt;:8000,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;SidecarImage&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;gcr.io/agones-images/agones-sdk:1.23.0&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;SidecarCPURequest&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;30m&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;SidecarCPULimit&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;0&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;SidecarMemoryRequest&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;0&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;SidecarMemoryLimit&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;0&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;SdkServiceAccount&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones-sdk&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;AlwaysPullSidecar&amp;#34;&lt;/span&gt;:false,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;PrometheusMetrics&amp;#34;&lt;/span&gt;:true,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Stackdriver&amp;#34;&lt;/span&gt;:false,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;StackdriverLabels&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;KeyFile&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;/home/agones/certs/server.key&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;CertFile&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;/home/agones/certs/server.crt&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;KubeConfig&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;GCPProjectID&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;NumWorkers&amp;#34;&lt;/span&gt;:100,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;APIServerSustainedQPS&amp;#34;&lt;/span&gt;:400,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;APIServerBurstQPS&amp;#34;&lt;/span&gt;:500,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;LogDir&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;/home/agones/logs&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;LogLevel&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;info&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;LogSizeLimitMB&amp;#34;&lt;/span&gt;:10000&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;featureGates&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Example=true\u0026NodeExternalDNS=true\u0026PlayerAllocationFilter=false\u0026PlayerTracking=false&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;message&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;starting gameServer operator...&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;severity&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;info&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;source&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;main&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;time&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;2022-06-15T21:15:40.309528802Z&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;version&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;1.23.0&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;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;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;ctlConf&lt;/code&gt; section has the full configuration for Agones as it was passed to the controller. Within that log line
there is a &lt;code&gt;featureGates&lt;/code&gt; key, that has the full Feature Gate configuration as a URL Query String (&lt;code&gt;\u0026&lt;/code&gt;
is JSON for &lt;code&gt;&amp;amp;&lt;/code&gt;), so you can see if the Feature Gates are set as expected.&lt;/p&gt;
&lt;h2 id=&#34;i-uninstalled-agones-before-deleted-all-my-gameservers-and-now-they-wont-delete&#34;&gt;I uninstalled Agones before deleted all my &lt;code&gt;GameServers&lt;/code&gt; and now they won&amp;rsquo;t delete&lt;/h2&gt;
&lt;p&gt;Agones &lt;code&gt;GameServers&lt;/code&gt; use &lt;a href=&#34;https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#finalizers&#34;&gt;Finalizers&lt;/a&gt;
to manage garbage collection of the &lt;code&gt;GameServers&lt;/code&gt;. This means that if the Agones controller
doesn&amp;rsquo;t remove the finalizer for you (i.e. if it has been uninstalled),  it can be tricky to remove them all.&lt;/p&gt;
&lt;p&gt;Thankfully, if we create a patch to remove the finalizers from all GameServers, we can delete them with impunity.&lt;/p&gt;
&lt;p&gt;A quick one liner to do this:&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 gameserver -o name &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; xargs -n1 -P1 -I&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{}&lt;/span&gt; kubectl patch &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{}&lt;/span&gt; --type&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;merge -p &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;{&amp;#34;metadata&amp;#34;: {&amp;#34;finalizers&amp;#34;: []}}&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Once this is done, you can &lt;code&gt;kubectl delete gs --all&lt;/code&gt; and clean everything up (if it&amp;rsquo;s not gone already).&lt;/p&gt;
&lt;h2 id=&#34;im-getting-forbidden-errors-when-trying-to-install-agones&#34;&gt;I&amp;rsquo;m getting Forbidden errors when trying to install Agones&lt;/h2&gt;
&lt;p&gt;Ensure that you are running Kubernetes 1.12 or later, which does not require any special
clusterrolebindings to install Agones.&lt;/p&gt;
&lt;p&gt;If you want to install Agones on an older version of Kubernetes, you need to create a
clusterrolebinding to add your identity as a cluster admin, e.g.&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;# Kubernetes Engine&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl create clusterrolebinding cluster-admin-binding &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;  --clusterrole cluster-admin --user &lt;span style=&#34;color:#4e9a06&#34;&gt;`&lt;/span&gt;gcloud config get-value account&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:#8f5902;font-style:italic&#34;&gt;# Minikube&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl create clusterrolebinding cluster-admin-binding &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;  --clusterrole&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;cluster-admin --serviceaccount&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;kube-system:default
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;On GKE, &lt;code&gt;gcloud config get-value accounts&lt;/code&gt; will return a lowercase email address, so if
you are using a CamelCase email, you may need to type it in manually.&lt;/p&gt;
&lt;h2 id=&#34;im-getting-stuck-in-terminating-when-i-uninstall-agones&#34;&gt;I&amp;rsquo;m getting stuck in &amp;ldquo;Terminating&amp;rdquo; when I uninstall Agones&lt;/h2&gt;
&lt;p&gt;If you try to uninstall the &lt;code&gt;agones-system&lt;/code&gt; namespace before you have removed all of the components in the namespace you may
end up in a &lt;code&gt;Terminating&lt;/code&gt; state.&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 ns
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;NAME              STATUS        AGE                                                                                                                                                    
agones-system     Terminating   4d
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Fixing this up requires us to bypass the finalizer in Kubernetes (&lt;a href=&#34;https://www.ibm.com/support/knowledgecenter/en/SSBS6K_3.1.1/troubleshoot/ns_terminating.html&#34;&gt;article link&lt;/a&gt;), by manually changing the namespace details:&lt;/p&gt;
&lt;p&gt;First get the current state of the 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;kubectl get namespace agones-system -o json &amp;gt;tmp.json
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Edit the response &lt;code&gt;tmp.json&lt;/code&gt; to remove the finalizer data, for example remove the following:&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:#4e9a06&#34;&gt;&amp;#34;spec&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#a40000&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;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:#204a87;font-weight:bold&#34;&gt;&amp;#34;finalizers&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;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:#4e9a06&#34;&gt;&amp;#34;kubernetes&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:#000;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;font-weight:bold&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#a40000&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Open a new terminal to proxy traffic:&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 proxy
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Starting to serve on 127.0.0.1:8001
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now make an API call to send the altered namespace data:&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; curl -k -H &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt; -X PUT --data-binary @tmp.json http://127.0.0.1:8001/api/v1/namespaces/agones-system/finalize
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You may need to clean up any other Agones related resources you have in your cluster at this point.&lt;/p&gt;

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