Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Nama
kf ssh - Membuka shell di instance Aplikasi.
Synopsis
kf ssh APP_NAME [flags]
Deskripsi
Membuka shell di instance Aplikasi menggunakan endpoint exec Pod.
Perintah ini meniru perintah SSH CF dengan membuka koneksi ke
bidang kontrol Kubernetes yang menghasilkan proses di Pod.
Perintah ini terhubung ke Pod arbitrer yang cocok dengan label runtime
Aplikasi. Jika Anda menginginkan Pod tertentu, gunakan notasi pod/ .
CATATAN: Traffic dienkripsi antara CLI dan bidang kontrol, serta
antara bidang kontrol dan Pod. Panel kontrol Kubernetes berbahaya
dapat mengamati traffic.
Contoh
# Open a shell to a specific App
kf ssh myapp
# Open a shell to a specific Pod
kf ssh pod/myapp-revhex-podhex
# Start a different command with args
kf ssh myapp -c /my/command -c arg1 -c arg2
Flag
-c, --command=stringArray
Perintah yang akan dijalankan untuk shell. Definisi berikutnya akan digunakan sebagai argumen. (default [/bin/bash])
--container=string
Penampung untuk memulai perintah. (default "user-container")
-T, --disable-pseudo-tty
Jangan gunakan TTY saat menjalankan.
-h, --help
bantuan untuk ssh
Flag yang diwarisi
Flag ini diwarisi dari perintah induk.
--as=string
Nama pengguna yang akan disamarkan untuk operasi.
--as-group=strings
Grup yang akan disamarkan untuk operasi. Sertakan flag ini beberapa kali untuk menentukan beberapa grup.
--config=string
Jalur ke file konfigurasi Kf yang akan digunakan untuk permintaan CLI.
--kubeconfig=string
Jalur ke file kubeconfig yang akan digunakan untuk permintaan CLI.
--log-http
Mencatat permintaan HTTP ke error standar.
--space=string
Ruang untuk menjalankan perintah. Flag ini menggantikan Ruang yang saat ini ditargetkan.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[],[],null,["# kf ssh\n\n### Name\n\n`kf ssh` - Open a shell on an App instance.\n\n### Synopsis\n\n```\nkf ssh APP_NAME [flags]\n```\n\n### Description\n\nOpens a shell on an App instance using the Pod exec endpoint.\n\nThis command mimics CF's SSH command by opening a connection to the\nKubernetes control plane which spawns a process in a Pod.\n\nThe command connects to an arbitrary Pod that matches the App's runtime\nlabels. If you want a specific Pod, use the pod/ notation.\n\nNOTE: Traffic is encrypted between the CLI and the control plane, and\nbetween the control plane and Pod. A malicious Kubernetes control plane\ncould observe the traffic.\n\n### Examples\n\n```\n# Open a shell to a specific App\nkf ssh myapp\n\n# Open a shell to a specific Pod\nkf ssh pod/myapp-revhex-podhex\n\n# Start a different command with args\nkf ssh myapp -c /my/command -c arg1 -c arg2\n```\n\n### Flags\n\n`-c, --command=`\u003cvar translate=\"no\"\u003estringArray\u003c/var\u003e\n\n: Command to run for the shell. Subsequent definitions will be used as args. (default \\[/bin/bash\\])\n\n`--container=`\u003cvar translate=\"no\"\u003estring\u003c/var\u003e\n\n: Container to start the command in. (default \"user-container\")\n\n`-T, --disable-pseudo-tty`\n\n: Don't use a TTY when executing.\n\n`-h, --help`\n\n: help for ssh\n\n### Inherited flags\n\nThese flags are inherited from parent commands.\n\n`--as=`\u003cvar translate=\"no\"\u003estring\u003c/var\u003e\n\n: Username to impersonate for the operation.\n\n`--as-group=`\u003cvar translate=\"no\"\u003estrings\u003c/var\u003e\n\n: Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.\n\n`--config=`\u003cvar translate=\"no\"\u003estring\u003c/var\u003e\n\n: Path to the Kf config file to use for CLI requests.\n\n`--kubeconfig=`\u003cvar translate=\"no\"\u003estring\u003c/var\u003e\n\n: Path to the kubeconfig file to use for CLI requests.\n\n`--log-http`\n\n: Log HTTP requests to standard error.\n\n`--space=`\u003cvar translate=\"no\"\u003estring\u003c/var\u003e\n\n: Space to run the command against. This flag overrides the currently targeted Space."]]