Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Stackland
  • What's new
  • Installation
    • All tutorials
    • Installing Stackland on Yandex BareMetal
    • Setting up external access to a pod in a cluster
    • All guides
    • Projects
    • Resource model
  • Access management
  • Pricing policy
  • Diagnostics and troubleshooting

In this article:

  • Getting started
  • How to create external access
  • Step 1: Create an ingress resource
  • Step 2: Create an HTML page
  • Step 3: Create a deployment resource for the HTML page
  • Step 4: Create a service resource for the HTML page
  • Step 5: Test access
  1. Tutorials
  2. Setting up external access to a pod in a cluster

Setting up external access to a pod in a cluster

Written by
Yandex Cloud
Updated at April 8, 2026
  • Getting started
  • How to create external access
    • Step 1: Create an ingress resource
    • Step 2: Create an HTML page
    • Step 3: Create a deployment resource for the HTML page
    • Step 4: Create a service resource for the HTML page
    • Step 5: Test access

Stackland allows users to run their own applications in a cluster and create external access to them. In this guide, we will show you an example of creating external access to an HTML page in a cluster.

Getting startedGetting started

  1. If the project does not exist yet, create it: kubectl create namespace <project_name>.

  2. Select a lin for external access, e.g., test.<cluster domain>.

    You can get the cluster domain using kubectl get platformenvironments main -o jsonpath='{.status.clusterDomain}', if required.

How to create external accessHow to create external access

Step 1: Create an ingress resourceStep 1: Create an ingress resource

  1. Create a file of the Ingress resource, e.g., using the touch ingress.yaml command.

  2. Open the file and paste the configuration below into it:

    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      annotations:
        cert-manager.io/cluster-issuer: stackland-default
      name: test-stackland-ingress
      namespace: <project name>
    spec:
      ingressClassName: stackland-default
      rules:
      - host: <external link>
        http:
          paths:
          - backend:
              service:
                name: test-stackland-service
                port:
                  number: 5556
            path: /
            pathType: Prefix
      tls:
      - hosts:
        - <external link>
        secretName: test-stackland-tls
    
  3. Provide the following in the parameter:

    • metadata.namespace: Project name.
    • spec.rules[0].host: External access link.
    • spec.tls[0].hosts[0]: External access link.
  4. Apply the kubectl apply -f ingress.yaml manifest.

Step 2: Create an HTML pageStep 2: Create an HTML page

  1. Create a file of the ConfigMap resource, e.g., using the touch configmap.yaml command.

  2. Open the file and paste the configuration below into it:

    apiVersion: v1
    data:
      index.html: "<!DOCTYPE html>\n<html>\n<head>\n    <title>Stackland test</title>\n    <meta charSet=\"UTF-8\"/>\n</head>\n<body>\n    <h1>Stackland external access test</h1>\n    <p>This page is used to test external access to Stackland</p>\n</body>\n</html>\n"
    kind: ConfigMap
    metadata:
      name: test-stackland-html
      namespace: <project name>
    
  3. Provide the project name in the metadata.namespace parameter.

  4. Apply the manifest: kubectl apply -f configmap.yaml.

Step 3: Create a deployment resource for the HTML pageStep 3: Create a deployment resource for the HTML page

  1. Create a file of the Deployment resource, e.g., using the touch deployment.yaml command.

  2. Open the file and paste the configuration below into it:

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: test-stackland
      namespace: <project name>
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: test-stackland-service
      template:
        metadata:
          labels:
            app: test-stackland-service
        spec:
          containers:
          - image: nginx:alpine
            name: nginx
            ports:
            - containerPort: 80
            volumeMounts:
            - mountPath: /usr/share/nginx/html
              name: html
          volumes:
          - configMap:
              name: test-stackland-html
            name: html
    
  3. Provide the project name in the metadata.namespace parameter.

  4. Apply the manifest: kubectl apply -f deployment.yaml.

Step 4: Create a service resource for the HTML pageStep 4: Create a service resource for the HTML page

  1. Create a file of the Service resource, e.g., using the touch service.yaml command.

  2. Open the file and paste the configuration below into it:

    apiVersion: v1
    kind: Service
    metadata:
      name: test-stackland-service
      namespace: <project name>
    spec:
      ports:
      - port: 5556
        targetPort: 80
      selector:
        app: test-stackland-service
    
  3. Provide the project name in the metadata.namespace parameter.

  4. Apply the manifest: kubectl apply -f service.yaml.

Step 5: Test accessStep 5: Test access

Use your web browser to open the external access link you selected. You should see the test HTML page there.

Was the article helpful?

Previous
Installing Stackland on Yandex BareMetal
Next
All guides
© 2026 Direct Cursus Technology L.L.C.